note 115760 deleted from language.namespaces.definition by cmb
| From: | cmb@php.net | Date: | Thu, 03 Sep 2015 10:21:40 +0000 |
| Subject: | note 115760 deleted from language.namespaces.definition by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-203612@lists.php.net to get a copy of this message | ||
Note Submitter: Najeem M Illyas
----
While executing the script I am getting error:
<?php
namespace SebastianBergmann\Money;
/**
* Money
*
/
class MoneyTest extends \PHPUnit_Framework_TestCase
{
/**
}
?>
C:\>phpunit --coverage-html ./report C:\xampp\htdocs\unit
Fatal error: Namespace declaration statement has to be the very first statement
in the script in C:\xampp\htdocs\unit\MoneyTest.php on line 2
Call Stack:
0.0000 124064 1. {main}() C:\xampp\php\phpunit:0
0.0000 359648 2. PHPUnit_TextUI_Command::main() C:\xampp\php\phpunit:4
6
0.0000 363064 3. PHPUnit_TextUI_Command->run() C:\xampp\php\pear\PHPUn
it\TextUI\Command.php:129
0.0100 542472 4. PHPUnit_Runner_BaseTestRunner->getTest() C:\xampp\php
\pear\PHPUnit\TextUI\Command.php:150
0.0100 681336 5. PHPUnit_Framework_TestSuite->addTestFiles() C:\xampp\
php\pear\PHPUnit\Runner\BaseTestRunner.php:96
0.0100 681768 6. PHPUnit_Framework_TestSuite->addTestFile() C:\xampp\p
hp\pear\PHPUnit\Framework\TestSuite.php:416
0.0200 739488 7. PHPUnit_Util_Fileloader::checkAndLoad() C:\xampp\php\
pear\PHPUnit\Framework\TestSuite.php:355
0.0200 739600 8. PHPUnit_Util_Fileloader::load() C:\xampp\php\pear\PHP
Unit\Util\Fileloader.php:76
Here in the error:
Fatal error: Namespace declaration statement has to be the very first statement
in the script in C:\xampp\htdocs\unit\MoneyTest.php on line 2
There is no error found in the code, but phpunit is throwing the error.