// +---------------------------------------------------------------------- /** * Log测试 * @author liu21st */ namespace tests\thinkphp\library\think; use think\Log; class logTest extends \PHPUnit_Framework_TestCase { public function testSave() { Log::init(['type' => 'test']); Log::clear(); Log::record('test'); Log::record([1, 2, 3]); $this->assertTrue(Log::save()); } public function testWrite() { Log::init(['type' => 'test']); Log::clear(); $this->assertTrue(Log::write('hello', 'info')); $this->assertTrue(Log::write([1, 2, 3], 'log')); } }