public static function setLoggerImpl($impl) { if (!$impl instanceof \Psr\Log\LoggerInterface) { throw new \InvalidArgumentException('Logger Impl must be instance of Psr\\Log\\LoggerInterface'); } self::$_impl = $impl; }
/** * @expectedException InvalidArgumentException * @expectedExceptionMessage Logger Impl must be instance of Psr\Log\LoggerInterface */ public function testSetLoggerImpl() { $obj = new \ArrayObject(); Logger::setLoggerImpl($obj); }