public static function eq($value, $value2, $message = '')
{
if ($value2 != $value) {
static::reportInvalidArgument(sprintf($message ?: 'Expected a value equal to %2$s. Got: %s', static::valueToString($value), static::valueToString($value2)));
}
}
/** * 测试用户不存在 */ function testUserNotExists() { $api = $this->createApi($this->url)->setQuery(['email' => '*****@*****.**', 'password' => '123456'])->setVerify($this->getMechanic()->getAssetPath() . DIRECTORY_SEPARATOR . 'cacert.pem'); $response = $this->request($api); $responseData = json_decode($response->getBody()); Assert::eq($response->getStatusCode(), 200, '服务器连接错误'); Assert::eq($responseData->code, 104, '状态码返回错误'); }