// +---------------------------------------------------------------------- /** * Test File Log */ namespace tests\thinkphp\library\think\log\driver; use think\Log; class fileTest extends \PHPUnit_Framework_TestCase { protected function setUp() { Log::init(['type' => 'file']); } public function testRecord() { $record_msg = 'record'; Log::record($record_msg, 'notice'); $logs = Log::getLog(); $this->assertNotFalse(array_search($record_msg, $logs['notice'])); } }