php - Cannot get PHPUnit working on Symfony 2 -
i working symfony 2 , trying phpunit work i've added composer.json under required-dev:
"phpunit/phpunit": "4.6.*"
runned command in terminal:
composer update --dev
after doing above phpunit appears under vendor
directory.
according docs symfony 2 has phpunit pre configured , can executed by: phpunit -c app/
but never works , terminal message is:
unknown command “phpunit” program 'phpunit' not installed. can install typing: sudo apt-get install phpunit
even through ./bin/phpunit -c app
seems trigger phpunit no matter test write this:
configuration read /home/tomazi/dev/api.test/app/phpunit.xml.dist time: 66 ms, memory: 4.25mb no tests executed!
my test:
<?php namespace boltmail\user\interactionbundle\tests\dto\template; class testtemplatetest extends \phpunit_framework_testcase { public function testindex() { $this->asserttrue(true); } }
you either have specify directories in phpunit config file phpunit.xml.dist or run command specific directory or file
./bin/phpunit -c app/ path/to/your/test/folder
Comments
Post a Comment