function test_extract_jpeg_images_with_redirection() { $html = '<html><body><img src="http://ocafe.appspot.com/?redirect=true"/></body></html>'; $images = p2mixi_extract_jpeg_images($html, 1); // Assert::equals( count ($images['images']), 1, ''); Assert::equals(strlen($images['images'][0]), 5221, ''); }
function test_post() { $url = $this->get_test_server_url(); $request_headers = array('Content-type' => 'application/x-www-form-urlencoded'); $response_headers = array(); $response_body = ''; $request_body = 'name=value123'; p2mixi_http_post($url, $request_headers, $request_body, $response_headers, $response_body); Assert::equals($response_body, $request_body, $request_body); }
public function testCountItems() { $filter = array(); $count = count($this->test->getList($filter)); Assert::equals($this->count, $count); }
function doTest($testfunc, $input, $expected, $arg = NULL, $message = '') { $actual = $testfunc($input, $arg); // echo ( $actual ); Assert::equals($actual, $expected, $message); }
static function equalsFalse($bool, $message = '') { Assert::equals($bool, false, $message); }