本文整理匯總了PHP中Assert::equals方法的典型用法代碼示例。如果您正苦於以下問題:PHP Assert::equals方法的具體用法?PHP Assert::equals怎麽用?PHP Assert::equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Assert
的用法示例。
在下文中一共展示了Assert::equals方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: test_extract_jpeg_images_with_redirection
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, '');
}
示例2: test_post
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);
}
示例3: testCountItems
public function testCountItems()
{
$filter = array();
$count = count($this->test->getList($filter));
Assert::equals($this->count, $count);
}
示例4: doTest
function doTest($testfunc, $input, $expected, $arg = NULL, $message = '')
{
$actual = $testfunc($input, $arg);
// echo ( $actual );
Assert::equals($actual, $expected, $message);
}
示例5: equalsFalse
static function equalsFalse($bool, $message = '')
{
Assert::equals($bool, false, $message);
}