mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
单元测试修正
This commit is contained in:
@@ -29,6 +29,6 @@ class fileTest extends \PHPUnit_Framework_TestCase
|
|||||||
Log::record($record_msg, 'notice');
|
Log::record($record_msg, 'notice');
|
||||||
$logs = Log::getLog();
|
$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(){
|
public function testRecord(){
|
||||||
Log::clear();
|
Log::clear();
|
||||||
Log::record('test');
|
Log::record('test');
|
||||||
$this->assertEquals([['type'=>'log','msg'=>'test']], Log::getLog());
|
$this->assertEquals(['log'=>['test'], Log::getLog());
|
||||||
Log::record('hello','info');
|
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::clear();
|
||||||
Log::info('test');
|
Log::info('test');
|
||||||
$this->assertEquals([['type'=>'info','msg'=>'test']], Log::getLog());
|
$this->assertEquals(['info'=>['test']], Log::getLog());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSave(){
|
public function testSave(){
|
||||||
|
|||||||
Reference in New Issue
Block a user