Esempio n. 1
0
 public function setUp()
 {
     parent::setUp();
     $this->sublogger = $this->getMockBuilder('\\Plop\\LoggerAbstract')->getMock();
     $this->indirect = $this->getMockBuilder('\\Plop\\IndirectLoggerAbstract')->setMethods(array('getIndirectLogger'))->getMock();
     $this->indirect->expects($this->once())->method('getIndirectLogger')->will($this->returnValue($this->sublogger));
 }
Esempio n. 2
0
 public function setUp()
 {
     parent::setUp();
     $this->record = $this->getMockBuilder('\\Plop\\Stub\\RecordInterface')->getMock();
     $this->formatter = $this->getMockBuilder('\\Plop\\FormatterInterface')->getMock();
     $this->handler = $this->getMockBuilder('\\Plop\\Stub\\HandlerAbstract')->setMethods(array('emit'))->getMock();
 }
Esempio n. 3
0
 public function setUp()
 {
     parent::setUp();
     $this->line = __LINE__;
     $this->interpolator = $this->getMockBuilder('\\Plop\\InterpolatorInterface')->getMock();
     $this->interpolator->expects($this->any())->method('interpolate')->will($this->returnArgument(0));
     $this->record = new \Plop\Record('loggerNamespace', 'loggerClass', 'loggerMethod', 'namespace', 'class', 'method', \Plop\DEBUG, __FILE__, $this->line, '@ %(foo)s @', array('foo' => 'bar'), $this->interpolator);
 }
Esempio n. 4
0
 public function setUp()
 {
     parent::setUp();
     $this->logger = new \Plop\Logger();
     $this->factory = $this->getMockBuilder('\\Plop\\RecordFactoryInterface')->getMock();
     $this->record = $this->getMockBuilder('\\Plop\\Stub\\RecordInterface')->getMock();
     $this->handler = $this->getMockBuilder('\\Plop\\HandlerInterface')->getMock();
 }
Esempio n. 5
0
 public function tearDown()
 {
     // This is necessary to avoid a segfault under PHP 5.2.x.
     if (is_resource($this->socket)) {
         fclose($this->socket);
     }
     unset($this->handler);
     parent::tearDown();
 }
Esempio n. 6
0
 public function setUp()
 {
     parent::setUp();
     $this->record = $this->getMockBuilder('\\Plop\\Stub\\RecordInterface')->getMock();
     $this->formatter = new \Plop\Stub\Formatter();
 }
Esempio n. 7
0
 public function setUp()
 {
     parent::setUp();
     $this->interpolator = new \Plop\Interpolator\Percent();
 }
Esempio n. 8
0
 public function tearDown()
 {
     unset($this->handler);
     parent::tearDown();
 }
Esempio n. 9
0
 public function setUp()
 {
     parent::setUp();
     $this->logger = $this->getMockBuilder('\\Plop\\LoggerAbstract')->setMethods(array('log', 'getLevel', 'setLevel', 'isEnabledFor', 'getNamespace', 'getClass', 'getMethod', 'getRecordFactory', 'setRecordFactory', 'getFilters', 'setFilters', 'getHandlers', 'setHandlers'))->getMock();
 }
Esempio n. 10
0
 public function setUp()
 {
     parent::setUp();
 }
Esempio n. 11
0
 public function setUp()
 {
     parent::setUp();
     $this->plop = new \Plop\Stub\Plop(true);
     $this->logger = $this->getMockBuilder('\\Plop\\LoggerInterface')->getMock();
 }