Application\Sonata\UserBundle\Tests\Functional\LoginTest::testNotLoggedInUser PHP Method

testNotLoggedInUser() public method

public testNotLoggedInUser ( )
    public function testNotLoggedInUser()
    {
        $client = $this->getClient();
        $client->followRedirects(true);
        $crawler = $client->request('GET', '/admin/dashboard');
        $data = array('_username' => 'broken', '_password' => 'test');
        $form = $crawler->selectButton('Login')->form();
        $crawler = $client->submit($form, $data);
        $this->assertGreaterThan(0, $crawler->filter('html:contains("Bad credentials")')->count());
    }