mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
fix ZMRequestTest wrong assertion
This commit is contained in:
@@ -56,9 +56,9 @@ class ZMConfigTest extends TestCase
|
||||
]);
|
||||
|
||||
try {
|
||||
$config = new ZMConfig([
|
||||
$this->vfs->url(),
|
||||
], 'development');
|
||||
$init_conf = require SOURCE_ROOT_DIR . '/config/config.php';
|
||||
$init_conf['source']['paths'] = [$this->vfs->url()];
|
||||
$config = new ZMConfig('development', $init_conf);
|
||||
} catch (ConfigException $e) {
|
||||
$this->fail($e->getMessage());
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@ class ZMRequestTest extends TestCase
|
||||
|
||||
public function testGet()
|
||||
{
|
||||
$r = ZMRequest::get('http://ip.zhamao.xin');
|
||||
$this->assertStringContainsString('114', $r);
|
||||
$r = ZMRequest::get('http://httpbin.org/get', [
|
||||
'X-Test' => '123',
|
||||
]);
|
||||
$this->assertStringContainsString('123', $r);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user