I am working with Symfony 2 and trying to get PHPunit to work with it so I've added this to my composer.json under required-dev:
"phpunit/phpunit": "4.6.*"
runned this command in my terminal:
composer update --dev
after doing the above PHPUnit appears under the vendor directory.
According to the docs Symfony 2 has PHPUnit pre configured and can be executed by: phpunit -c app/
But it never works and my terminal message is:
Unknown command “phpunit”
The program 'phpunit' is currently not installed. You can install it by typing:
sudo apt-get install phpunit
Even through this ./bin/phpunit -c app seems to trigger phpunit no matter what test I write I always get this:
Configuration read from /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);
}
}
./bin/orvendor/bin/directories. This is set by an (optional)binjson configuration in composer.json. The default is to put executable commands intovendor/bin/