修正单元测试错误

This commit is contained in:
thinkphp
2016-02-02 15:29:03 +08:00
parent 8ec6835dca
commit 27cc3d524a
4 changed files with 49 additions and 49 deletions

View File

@@ -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));
}
}
}