Backend\Modules\Blog\Tests\Action\IndexTest::testAuthenticationIsNeeded PHP Метод

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

    public function testAuthenticationIsNeeded()
    {
        $this->logout();
        $client = static::createClient();
        $this->loadFixtures($client, array('Backend\\Modules\\Blog\\DataFixtures\\LoadBlogCategories', 'Backend\\Modules\\Blog\\DataFixtures\\LoadBlogPosts'));
        $client->setMaxRedirects(1);
        $client->request('GET', '/private/en/blog/index');
        // we should get redirected to authentication with a reference to blog index in our url
        self::assertStringEndsWith('/private/en/authentication?querystring=%2Fprivate%2Fen%2Fblog%2Findex', $client->getHistory()->current()->getUri());
    }