Skip to content

Commit 7250391

Browse files
committed
Updated the doc for symfony/symfony#4497
1 parent 354350e commit 7250391

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

book/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ document::
275275
// Assert that the response status code is 404
276276
$this->assertTrue($client->getResponse()->isNotFound());
277277
// Assert a specific 200 status code
278-
$this->assertEquals(200, $client->getResponse()->getStatusCode());
278+
$this->assertEquals(200, $client->getResponse()->getStatus());
279279

280280
// Assert that the response is a redirect to /demo/contact
281281
$this->assertTrue($client->getResponse()->isRedirect('/demo/contact'));

cookbook/testing/insulating_clients.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ chat for instance), create several Clients::
1313
$harry->request('POST', '/say/sally/Hello');
1414
$sally->request('GET', '/messages');
1515

16-
$this->assertEquals(201, $harry->getResponse()->getStatusCode());
16+
$this->assertEquals(201, $harry->getResponse()->getStatus());
1717
$this->assertRegExp('/Hello/', $sally->getResponse()->getContent());
1818

1919
This works except when your code maintains a global state or if it depends on
@@ -29,7 +29,7 @@ can insulate your clients::
2929
$harry->request('POST', '/say/sally/Hello');
3030
$sally->request('GET', '/messages');
3131

32-
$this->assertEquals(201, $harry->getResponse()->getStatusCode());
32+
$this->assertEquals(201, $harry->getResponse()->getStatus());
3333
$this->assertRegExp('/Hello/', $sally->getResponse()->getContent());
3434

3535
Insulated clients transparently execute their requests in a dedicated and

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy