I am trying to get phpunit to work on my ubuntu 11.10 installation.
I have installed PHPUnit using PEAR, as suggested here and then I prepared a very small testing class:
error_reporting(E_ALL & ~E_DEPRECATED);
set_include_path(get_include_path().':/usr/share/php');
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Extensions/OutputTestCase.php';
class ExampleTest extends PHPUnit_Framework_TestCase
{
public function testOne()
{
$this->assertTrue(FALSE);
}
}
// $suite = new PHPUnit_Framework_TestSuite('ExampleTest');
// PHPUnit_TextUI_TestRunner::run($suite);
When I run this via the command line executable phpunit, I get nothing.
When I uncomment the last two lines and run the file with the php executable, I get proper output (Failed asserting that is true. etc..)
Further more, when I try phpunit –version, I still get nothing!
Any ideas??
I just figured it out…I forgot to add /usr/share/php in the include_path in php.ini. grrrrrr…