Skip to content

Commit be5fe37

Browse files
committed
Improved a test
1 parent 211da90 commit be5fe37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testing/http_authentication.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ needs::
8585

8686
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
8787
use Symfony\Component\BrowserKit\Cookie;
88+
use Symfony\Component\HttpFoundation\Response;
8889
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
8990

9091
class DefaultControllerTest extends WebTestCase
@@ -101,7 +102,7 @@ needs::
101102
$this->logIn();
102103
$crawler = $this->client->request('GET', '/admin');
103104

104-
$this->assertTrue($this->client->getResponse()->isSuccessful());
105+
$this->assertSame(Response::HTTP_OK, $this->client->getResponse());
105106
$this->assertSame('Admin Dashboard', $crawler->filter('h1')->text());
106107
}
107108

0 commit comments

Comments
 (0)