/** * Test $log->write() * * @access public * @return void */ function test_write() { $log = new Minion_Log(); $writer = $this->getMockForAbstractClass('Log_Writer'); $on_add = $this->getMockForAbstractClass('Log_Writer'); $log->attach($writer); $log->attach($on_add, array(), 0, TRUE); // Should be called on $log->write() $writer->expects($this->once())->method('write'); // Should be called on $log->add() $on_add->expects($this->once())->method('write'); $log->add(Log::INFO, "foobar"); $log->write(); }