PHPUnit_TestCase($name); } function setUp() { require dirname(__FILE__) . '/_config.inc.php'; require_once '../lib/GoogleAPI.inc.php'; $this->GoogleAPI =& new GoogleAPI(PARAM); } function tearDown() { unset($this->GoogleAPI); } function test_getcachedpage() { $result = $this->GoogleAPI->getcachedpage(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_getspellingsuggestion() { $result = $this->GoogleAPI->getspellingsuggestion(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_search() { $result = $this->GoogleAPI->search(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test__performapicall() { $result = $this->GoogleAPI->_performapicall(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_getfault() { $result = $this->GoogleAPI->getfault(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } } // Running the test. $suite = new PHPUnit_TestSuite('GoogleAPITest'); $result = PHPUnit::run($suite); echo $result->toString(); ?>