Commit c4587bdb authored by Fabien Potencier's avatar Fabien Potencier

merged branch WouterJ/master (PR #318)

Commits
-------

d2a9a6f6 [Doc/Testing] Replaced assertEquals(1, count(...)) with assertCount(1, ...)

Discussion
----------

[Doc] Used assertCount(1, ...) instead of assertEquals(1, count(..)) in Testing

It's better to use the `assertCount()` method from PHPunit for testing a length of a array. This method is avaible since PHPunit 3.6.0
parents 62e816fc d2a9a6f6
......@@ -129,8 +129,8 @@ and allows you to interact with your application. Here's how it works::
$crawler = $client->request('GET', '/');
$this->assertTrue($client->getResponse()->isOk());
$this->assertEquals(1, count($crawler->filter('h1:contains("Contact us")')));
$this->assertEquals(1, count($crawler->filter('form')));
$this->assertCount(1, $crawler->filter('h1:contains("Contact us")'));
$this->assertCount(1, $crawler->filter('form'));
...
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment