public function testSettingBadOptionThrows() { try { $writer = new Zend_Log_Writer_Stream('php://memory'); $writer->setOption('foo', 42); $this->fail(); } catch (Exception $e) { $this->assertType('InvalidArgumentException', $e); $this->assertRegExp('/unknown option/i', $e->getMessage()); } }