/** * @covers Robo47_Log_Writer_DoctrineTable::_write */ public function testWriteWithChangedColumnMap() { $mapping = array('message' => 'foo', 'priority' => 'baa', 'category' => 'blub', 'timestamp' => 'baafoo'); $this->_writer->setTable($this->_table2); $this->_writer->setColumnMap($mapping); $this->assertEquals(0, $this->_table2->count()); $date = date('c'); $event = array('message' => 'Foo', 'priority' => 0, 'category' => 'bla', 'timestamp' => $date); $this->_writer->write($event); $this->assertEquals(1, $this->_table2->count()); $entry = $this->_table2->createQuery()->select()->execute()->getFirst(); $this->assertEquals($event['message'], $entry->foo); $this->assertEquals($event['priority'], $entry->baa); $this->assertEquals($event['category'], $entry->blub); $this->assertEquals($event['timestamp'], $entry->baafoo); }