I am trying to learn a little bit about PHPUnit Testing and I have PHPUnit installed via PEAR, but I am having NO luck with trying to get it running.
Here is my script:
<?php
require_once "PHPUnit.php";
class myclass_test extends PHPUnit_TestCase {
protected $my;
function setUp() {
$this->$my = new Myclass('xxx', 'xxx', 'xxx');
}
function teardown() {
unset($this->my);
}
function testResponseCodeSuccess() {
self::assertTrue($this->my->_validResponseCode(200));
}
}
I am running this on the console: php myclass_test.php
I am getting these errors:
PHP Warning: require_once(PHPUnit.php): failed to open stream: No such file or directory in /Users/dennismonsewicz/Projects/PHP/test-php/tests/myclass_test.php on line 2
PHP Fatal error: require_once(): Failed opening required 'PHPUnit.php' (include_path='.:/Users/dennismonsewicz/pear/share/pear:/usr/local/share/pear:/usr/bin/pear') in /Users/dennismonsewicz/Projects/PHP/test-php/tests/myclass_test.php on line 2
I followed this tutorial: http://pear.php.net/manual/en/package.php.phpunit.intro.php
Anyone else run into these issues?