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(){