ubuntu - PHPUnit and PHPStorm... ResultPrinter.php Error -
Whenever I run a phpunit test from PHPStorm, I get an error. I have provided further information below
More info:
is located in PHPUnit.phar /usr/local/bin/phpunit.phar . I have a PHP_Pnit path setup directly in PHPPatet I run from test run with no problem. I also have my configuration file phpunit.xml in PHPUnit which is located in the root of my project. PHPUnit to load phpunit.xml file composer autoload.php file
PHPUnit output:.
/ usr / bin / php -dxdebug.remote_enable = 1 -dxdebug.remote_mode = request -dxdebug.remote_port = 9000 -dxdebug.remote_host = 127.0.0.1 /tmp/ide-phpunit.php --configuration / home / mkelley / projects / companyname / phpunit.xml test started from 10:33 am ... by PHPUnit 4.3.4 Sebastian Bergman. Configuration /home/mkelley/projects/CompanyName/phpunit.xml PHP Read the fatal error: Phar \ borders \ BoardMemberVotingBoundaryTest :: hasExpectationOnOutput (in) undefined method calls for CompanyNameTests: ///usr/local/bin/phpunit.phar/ 545 PHP stack trace phpunit /TextUI/ResultPrinter.php line: PHP 1 {main} () /tmp/ide-phpunit.php:0 PHP 2. IDE_Base_PHPUnit_TextUI_Command :: main ($ exit = * uninitialized *) / Tmp / idE -phpunit.php: 500 PHP 3. PHPUnit_TextUI_Command-> Run ($ argv = * initialize *, $ exit = * initialize *) /tmp/ide-phpunit.php#24 PHP 4 PHPUnit_TextUI_TestRunner- & gt; DoRun ($ suit = * unauthenticated *, argument $ = * unauthenticated *) phar: ///usr/local/bin/phpunit.phar/phpunit/TextUI/Command.php: 186 PHP 5. PHPUnit_Framework_TestSuite-> Run ($ result = * initialize *) /home/mkelley/projects/CompanName/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:423 PHP 6.PHPUnit_Framework_TestSuite-> Run ($ result = * initialize *) / home / mkelley / projects / companName / vendor / PHPUnit / PHPUnit / src / framework / TestSuite.php: 703 PHP 7. PHPUnit_Framework_TestCase- & gt; Run ($ result = * initialize *) /home/mkelley/projects/CompanName/vendor/phpunit/phpunit/src/Framework/TestSuite.php: 703 PHP 8. PHPUnit_Framework_TestResult-> Run ($ test = * initialize *) /home/mkelley/projects/CompanName/vendor/phpunit/phpunit/src/Framework/TestCase.php:771 PHP 9. PHPUnit_Framework_TestResult-> endTest ($ test = * uninitialized * $ t = uninitialized * *) /home/mkelley/projects/CompanName/vendor/phpunit/phpunit/src/Framework/TestResult.php:760 PHP 10 PHPUnit_TextUI_ResultPrinter- & gt; endTest ($ test = * uninitialized * $ t = uninitialized * *) finished with exit code out /home/mkelley/projects/CompanyName/vendor/phpunit/phpunit/src/Framework/TestResult.php:378 process 255 < / Code> I searched Google and found no such problem. I appreciate any help!
Edit
This is my phpunit.xml file. I PHPStorm is using it as "Use alternative configuration file"
& Lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; phpunit backupGlobals = "false" backupStaticAttributes = "false" colors = "true" bootstrap = "./ Akspesns = vendor / autoload.php" Convert Aartron "true" Convert Notstoaksepshn = "true" Knhwartwarningtoaksepshn = "true" Prkriyaaslikrn = "Incorrect" stoponfileer = "wrong" syntax check = "wrong" & gt; & Lt; Testsuites & gt; & Lt; Testuite name = "application test suite" & gt; & Lt; Directory & gt; ./test/ & lt; / Directory & gt; & Lt; / Testsuite & gt; & Lt; / Testsuites & gt; & Lt; / PHPUnit & gt;
This automated loading issue appears when you have a If you bootstrap the app then you have to start your autoloader, which does not seem like, as nothing has been found. The easiest way to manage the PHPUnit dependency and use the composer to auto-load your classes through the autoload instructions. See in the psr-4 section.
Then select Use custom autoloader in your PhpStorm PHPUnit configuration window and specify the path to your vendor /autoload.php script.
Sad, but it dont work for me
ReplyDelete