Bolt\Tests\Controller\Backend\AuthenticationTest::testLogout PHP Метод

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

public testLogout ( )
    public function testLogout()
    {
        $app = $this->getApp();
        $authentication = $this->getMockAccessChecker($app, ['revokeSession']);
        $authentication->expects($this->once())->method('revokeSession')->will($this->returnValue(true));
        $this->setService('access_control', $authentication);
        $this->setRequest(Request::create('/bolt/logout', 'POST', []));
        $response = $this->controller()->logout($this->getRequest());
        $this->assertRegExp('|Redirecting to /bolt/login|', $response->getContent());
    }