Skip to content

Commit

Permalink
Merge pull request #1440 from stof/testing
Browse files Browse the repository at this point in the history
Updated the doc for symfony/symfony#4497
  • Loading branch information
weaverryan committed Jun 17, 2012
2 parents e4f41e6 + 7250391 commit f86dc39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion book/testing.rst
Expand Up @@ -275,7 +275,7 @@ document::
// Assert that the response status code is 404
$this->assertTrue($client->getResponse()->isNotFound());
// Assert a specific 200 status code
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->assertEquals(200, $client->getResponse()->getStatus());

// Assert that the response is a redirect to /demo/contact
$this->assertTrue($client->getResponse()->isRedirect('/demo/contact'));
Expand Down
4 changes: 2 additions & 2 deletions cookbook/testing/insulating_clients.rst
Expand Up @@ -13,7 +13,7 @@ chat for instance), create several Clients::
$harry->request('POST', '/say/sally/Hello');
$sally->request('GET', '/messages');

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

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

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

Insulated clients transparently execute their requests in a dedicated and
Expand Down

0 comments on commit f86dc39

Please sign in to comment.