public function testWrite() { $writer = new MockWriter(); $this->assertSame(array(), $writer->events); $fields = array('foo' => 'bar'); $writer->write($fields); $this->assertSame(array($fields), $writer->events); }
/** * @dataProvider provideTestFilters */ public function testAddFilterByNameWithParams($filter, $options) { $writer = new MockWriter(); $writer->addFilter($filter, $options); $this->logger->addWriter($writer); $this->logger->log(Logger::INFO, '123'); $this->assertEquals(count($writer->events), 1); $this->assertContains('123', $writer->events[0]['message']); }