samedi 5 septembre 2015

Where comes this Fatal error from? cakephp phpunit

I created a cakephp3 project with composer.

composer create-project --prefer-dist cakephp/app foobar

Then, I baked a helper with

bin/cake bake helper Progress

And copypasted the helper-example in the cakephp testing tutorial Switching in the directory and performing phpunit says

PHP Fatal error:  Class Cake\TestSuite\Fixture\FixtureInjector contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (PHPUnit_Framework_TestListener::addWarning) in /home/matthias/www/isbn.localhost/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php on line 173
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:42
PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:138
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:186
PHP   5. PHPUnit_TextUI_TestRunner->handleConfiguration() /home/matthias/www/foobar/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:145
PHP   6. require_once() /home/matthias/www/foobar/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:771

Fatal error: Class Cake\TestSuite\Fixture\FixtureInjector contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (PHPUnit_Framework_TestListener::addWarning) in /home/matthias/www/foobar/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php on line 173

Call Stack:
    0.0001     225152   1. {main}() /usr/bin/phpunit:0
    0.0031     515440   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:42
    0.0031     516064   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:138
    0.6384    6931096   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:186
    0.6384    6932312   5. PHPUnit_TextUI_TestRunner->handleConfiguration() /home/matthias/www/foobar/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:145
    0.6458    7043088   6. require_once('/home/matthias/www/foobar/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php') /home/matthias/www/foobar/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:771

Doesn't matter if the global installed phpunit 4.2.6 or the latest version, installed with composer, is used. Where comes this from and how to can I fix this?

Thanks a lot!

Aucun commentaire:

Enregistrer un commentaire