mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
修正
This commit is contained in:
@@ -20,10 +20,11 @@ use think\Log;
|
|||||||
class logTest extends \PHPUnit_Framework_TestCase
|
class logTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function testRecord(){
|
public function testRecord()
|
||||||
|
{
|
||||||
Log::clear();
|
Log::clear();
|
||||||
Log::record('test');
|
Log::record('test');
|
||||||
$this->assertEquals(['log'=>['test'], Log::getLog());
|
$this->assertEquals(['log' => ['test']], Log::getLog());
|
||||||
Log::record('hello', 'info');
|
Log::record('hello', 'info');
|
||||||
$this->assertEquals(['log' => ['test'], 'info' => ['hello']], Log::getLog());
|
$this->assertEquals(['log' => ['test'], 'info' => ['hello']], Log::getLog());
|
||||||
Log::clear();
|
Log::clear();
|
||||||
@@ -31,7 +32,8 @@ class logTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals(['info' => ['test']], Log::getLog());
|
$this->assertEquals(['info' => ['test']], Log::getLog());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSave(){
|
public function testSave()
|
||||||
|
{
|
||||||
Log::init(['type' => 'test']);
|
Log::init(['type' => 'test']);
|
||||||
Log::clear();
|
Log::clear();
|
||||||
Log::record('test');
|
Log::record('test');
|
||||||
@@ -39,7 +41,8 @@ class logTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue(Log::save());
|
$this->assertTrue(Log::save());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWrite(){
|
public function testWrite()
|
||||||
|
{
|
||||||
Log::init(['type' => 'test']);
|
Log::init(['type' => 'test']);
|
||||||
Log::clear();
|
Log::clear();
|
||||||
$this->assertTrue(Log::write('hello', 'info'));
|
$this->assertTrue(Log::write('hello', 'info'));
|
||||||
|
|||||||
Reference in New Issue
Block a user