From 936b1e20e951e4d11efbe1f5fa9d0c0bb4addcaf Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 6 Jun 2016 14:29:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/log/driver/fileTest.php | 2 +- tests/thinkphp/library/think/logTest.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/thinkphp/library/think/log/driver/fileTest.php b/tests/thinkphp/library/think/log/driver/fileTest.php index 168ef81a..3453c09b 100644 --- a/tests/thinkphp/library/think/log/driver/fileTest.php +++ b/tests/thinkphp/library/think/log/driver/fileTest.php @@ -29,6 +29,6 @@ class fileTest extends \PHPUnit_Framework_TestCase Log::record($record_msg, 'notice'); $logs = Log::getLog(); - $this->assertNotFalse(array_search(['type' => 'notice', 'msg' => $record_msg], $logs)); + $this->assertNotFalse(array_search($record_msg, $logs['notice'])); } } diff --git a/tests/thinkphp/library/think/logTest.php b/tests/thinkphp/library/think/logTest.php index 3448b49e..6161f7d5 100644 --- a/tests/thinkphp/library/think/logTest.php +++ b/tests/thinkphp/library/think/logTest.php @@ -23,12 +23,12 @@ class logTest extends \PHPUnit_Framework_TestCase public function testRecord(){ Log::clear(); Log::record('test'); - $this->assertEquals([['type'=>'log','msg'=>'test']], Log::getLog()); + $this->assertEquals(['log'=>['test'], Log::getLog()); Log::record('hello','info'); - $this->assertEquals([['type'=>'log','msg'=>'test'],['type'=>'info','msg'=>'hello']], Log::getLog()); + $this->assertEquals(['log'=>['test'],'info'=>['hello']], Log::getLog()); Log::clear(); Log::info('test'); - $this->assertEquals([['type'=>'info','msg'=>'test']], Log::getLog()); + $this->assertEquals(['info'=>['test']], Log::getLog()); } public function testSave(){