public function testLogWarning() { $SofortLibAbstractMock = new SofortLibAbstractMock(self::$configkey); $FileLoggerHandler = $this->getMockForAbstractClass('fileLogger'); $FileLoggerHandler->expects($this->any())->method('log')->with('warning')->will($this->returnValue('warning')); $SofortLibAbstractMock->setLogger($FileLoggerHandler); $SofortLibAbstractMock->setLogEnabled(); $this->assertNull($SofortLibAbstractMock->logWarning('warning')); }
public function testSetLogger() { $SofortLibAbstractMock = new SofortLibAbstractMock(self::$configkey); $AbstractLoggerHandler = $this->getMockForAbstractClass('AbstractLoggerHandler'); $SofortLibAbstractMock->setLogger($AbstractLoggerHandler); $this->assertAttributeEquals($AbstractLoggerHandler, '_Logger', $SofortLibAbstractMock); }