PHPUnit_TestCase($name); } function test_local_file() { $my_code = file_get_contents_ex(__FILE__); $php_code = file_get_contents(__FILE__); // determine if the data is indetical $this->assertTrue($my_code == $php_code); } function test_remote_file() { $my_code = file_get_contents_ex("http://localhost/"); $php_code = file_get_contents("http://localhost/"); $this->assertTrue($my_code == $php_code); } function test_invalid_local_file() { $my_code = @file_get_contents_ex("/foo/bar"); $php_code = @file_get_contents("/foo/bar"); $this->assertTrue($my_code == $php_code); } } $suite = new PHPUnit_TestSuite("fgcTest"); $result = PHPUnit::run($suite); echo nl2br($result->toString()); ?>