Example #1
0
 /**
  * global test
  * 
  * @test
  * @return void
  * @author Sherlock Ren <*****@*****.**>
  */
 public function globalTest()
 {
     $hander = new FileHandler('/tmp/test.log');
     $this->assertTrue($hander instanceof $hander);
     $this->assertEquals('/tmp/test.log', $hander->link);
     $hander->setFormatter(new JsonFormatter());
     $this->assertTrue($hander->formatter instanceof FormatterInterface);
     $hander->setLink('/tmp/test.error');
     $this->assertEquals('/tmp/test.error', $hander->link);
     $hander->setLock(false);
     $this->assertFalse($hander->lock);
     $this->assertTrue($hander->handle(['test']));
 }