Backend\Modules\Authentication\Tests\Action\IndexTest::testUsersUserWithCorrectCredentials PHP Метод

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

This user only has the rights to access the users edit action. It should enable the user to edit his own user-account.
    public function testUsersUserWithCorrectCredentials()
    {
        $client = static::createClient();
        $client->setMaxRedirects(2);
        $crawler = $client->request('GET', '/private/en/authentication');
        self::assertEquals(200, $client->getResponse()->getStatusCode());
        $form = $crawler->selectButton('Log in')->form();
        $this->submitForm($client, $form, array('form' => 'authenticationIndex', 'backend_email' => '[email protected]', 'backend_password' => 'fork', 'form_token' => $form['form_token']->getValue()));
        self::assertContains('Edit profile', $client->getResponse()->getContent());
        // logout to get rid of this session
        $client->followRedirects(false);
        $client->request('GET', '/private/en/authentication/logout');
    }