/** * Testing that calling invalid methods throw exceptions */ public function testingInvalidLoggerMethodException() { // Arrange $this->setExpectedException('\\BadMethodCallException', 'foo method does not exist in Monolog\\Logger.'); $magoo = new Magoo(); $magoo->pushEmailMask(); $logger = new Logger('app'); $handler = new TestHandler(); $logger->pushHandler($handler); $magooLogger = new MagooLogger($logger, $magoo); // Act $magooLogger->foo('just a string'); }