note 115760 added to language.namespaces.definition
| From: | NajeemMIllyas | Date: | Thu, 18 Sep 2014 13:25:55 +0000 |
| Subject: | note 115760 added to language.namespaces.definition | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200480@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 72.52.91.14
Probable Submitter: 203.99.205.102
----
Manual Page -- http://php.net/manual/en/language.namespaces.definition.php
Edit -- https://master.php.net/note/edit/115760
Del: integrated -- https://master.php.net/note/delete/115760/integrated
Del: useless -- https://master.php.net/note/delete/115760/useless
Del: bad code -- https://master.php.net/note/delete/115760/bad+code
Del: spam -- https://master.php.net/note/delete/115760/spam
Del: non-english -- https://master.php.net/note/delete/115760/non-english
Del: in docs -- https://master.php.net/note/delete/115760/in+docs
Del: other reasons-- https://master.php.net/note/delete/115760
Reject -- https://master.php.net/note/reject/115760
Search -- https://master.php.net/manage/user-notes.php