/** * @covers Robo47_Log_Writer_Abstract::write */ public function testWriteWithFilterNotAccepting() { $filter = new Robo47_Log_Filter_Mock(false); $this->_writer->addFilter($filter); $this->_writer->write(array('foo' => 'bla')); $this->assertEquals(0, count($this->_writer->events)); }
/** * @covers Robo47_Log_Writer_Mock::_write */ public function testWrite() { $writer = new Robo47_Log_Writer_Mock(); $this->assertEquals(0, count($writer->events)); $writer->write(array('foo' => 'bla')); $this->assertEquals(1, count($writer->events)); $this->assertArrayHasKey(0, $writer->events); $this->assertArrayHasKey('foo', $writer->events[0]); $this->assertEquals('bla', $writer->events[0]['foo']); }