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)); }
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(); }
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); }
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(); }
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(); }
public function setUp() { parent::setUp(); $this->record = $this->getMockBuilder('\\Plop\\Stub\\RecordInterface')->getMock(); $this->formatter = new \Plop\Stub\Formatter(); }
public function setUp() { parent::setUp(); $this->interpolator = new \Plop\Interpolator\Percent(); }
public function tearDown() { unset($this->handler); parent::tearDown(); }
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(); }
public function setUp() { parent::setUp(); }
public function setUp() { parent::setUp(); $this->plop = new \Plop\Stub\Plop(true); $this->logger = $this->getMockBuilder('\\Plop\\LoggerInterface')->getMock(); }