mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
单元测试修正
This commit is contained in:
@@ -90,12 +90,14 @@ class requestTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testType()
|
public function testType()
|
||||||
{
|
{
|
||||||
$request = Request::instance();
|
$request = Request::instance();
|
||||||
$_SERVER['HTTP_ACCEPT'] = 'application/json';
|
$request->server(['HTTP_ACCEPT' => 'application/json']);
|
||||||
|
|
||||||
$this->assertEquals('json', $request->type());
|
$this->assertEquals('json', $request->type());
|
||||||
$request->mimeType('test', 'application/test');
|
$request->mimeType('test', 'application/test');
|
||||||
$request->mimeType(['test' => 'application/test']);
|
$request->mimeType(['test' => 'application/test']);
|
||||||
$_SERVER['HTTP_ACCEPT'] = 'application/test';
|
$request->server(['HTTP_ACCEPT' => 'application/test']);
|
||||||
|
|
||||||
$this->assertEquals('test', $request->type());
|
$this->assertEquals('test', $request->type());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user