mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
单元测试修正
This commit is contained in:
@@ -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']));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user