Neos\Flow\Tests\Unit\Session\Aspect\LoggingAspectTest::logDestroyLogsSessionIdAndArgumentReason PHP Метод

logDestroyLogsSessionIdAndArgumentReason() публичный Метод

Proofs correct logging behaviour
    public function logDestroyLogsSessionIdAndArgumentReason()
    {
        $testSession = new TransientSession();
        $testSession->start();
        $testSessionId = $testSession->getId();
        $mockJoinPoint = new JoinPoint($testSession, TransientSession::class, 'destroy', ['reason' => 'session timed out']);
        $mockSystemLogger = $this->createMock(SystemLoggerInterface::class);
        $mockSystemLogger->expects($this->once())->method('log')->with($this->equalTo('TransientSession: Destroyed session with id ' . $testSessionId . ': session timed out'), $this->equalTo(LOG_INFO));
        $loggingAspect = new LoggingAspect();
        $this->inject($loggingAspect, 'systemLogger', $mockSystemLogger);
        $loggingAspect->logDestroy($mockJoinPoint);
    }