mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修正单元测试错误
This commit is contained in:
@@ -49,7 +49,7 @@ class debugTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testRemark()
|
||||
{
|
||||
$name = "testremarkkey";
|
||||
$name = "testremarkkey";
|
||||
\think\Debug::remark($name);
|
||||
}
|
||||
|
||||
@@ -166,11 +166,11 @@ class debugTest extends \PHPUnit_Framework_TestCase
|
||||
$var = array();
|
||||
$var["key"] = "val";
|
||||
$output = \think\Debug::dump($var, false, $label = "label");
|
||||
|
||||
$array = explode("array", json_encode($output));
|
||||
if (IS_WIN) {
|
||||
$this->assertEquals("(1) {\\n 'key' =>\\n string(3) \\\"val\\\"\\n}\\n\\r\\n\"", end(explode("array", json_encode($output))));
|
||||
$this->assertEquals("(1) {\\n 'key' =>\\n string(3) \\\"val\\\"\\n}\\n\\r\\n\"", end($array));
|
||||
} else {
|
||||
$this->assertEquals("(1) {\\n 'key' =>\\n string(3) \\\"val\\\"\\n}\\n\\n\"", end(explode("array", json_encode($output))));
|
||||
$this->assertEquals("(1) {\\n 'key' =>\\n string(3) \\\"val\\\"\\n}\\n\\n\"", end($array));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user