diff --git a/src/Symfony/Components/HttpKernel/Test/WebTestCase.php b/src/Symfony/Components/HttpKernel/Test/WebTestCase.php index 8e908d2e409b..24226e4175c1 100644 --- a/src/Symfony/Components/HttpKernel/Test/WebTestCase.php +++ b/src/Symfony/Components/HttpKernel/Test/WebTestCase.php @@ -42,12 +42,12 @@ abstract public function createClient(array $options = array(), array $server = /** * Asserts that the response matches a given CSS selector. * + * @param array $expected The expected values for the attributes * @param string $selector A CSS selector * @param array $arguments An array of attributes to extract - * @param array $expected The expected values for the attributes * @param Symfony\Foundation\Client $client A Client instance */ - public function assertResponseSelectEquals($selector, $arguments, $expected, Client $client = null) + public function assertResponseSelectEquals($expected, $selector, $arguments, Client $client = null) { $this->assertEquals($expected, $this->getCrawler($client)->filter($selector)->extract($arguments)); } @@ -55,11 +55,11 @@ public function assertResponseSelectEquals($selector, $arguments, $expected, Cli /** * Asserts that the response matches a given CSS selector n times. * - * @param string $selector A CSS selector * @param integer $count The number of times the CSS selector must match + * @param string $selector A CSS selector * @param Symfony\Foundation\Client $client A Client instance */ - public function assertResponseSelectCount($selector, $count, Client $client = null) + public function assertResponseSelectCount($count, $selector, Client $client = null) { $this->assertEquals($count, $this->getCrawler($client)->filter($selector)->count(), sprintf('response selector "%s" matches "%s" times', $selector, $count)); } @@ -89,11 +89,11 @@ public function assertResponseNotSelectExists($selector, Client $client = null) /** * Asserts the a response header has the given value. * - * @param string $key The header name * @param string $value The header value + * @param string $key The header name * @param Symfony\Foundation\Client $client A Client instance */ - public function assertResponseHeaderEquals($key, $value, Client $client = null) + public function assertResponseHeaderEquals($value, $key, Client $client = null) { $headers = explode(', ', $this->getResponse($client)->headers->get($key)); foreach ($headers as $header) { @@ -108,11 +108,11 @@ public function assertResponseHeaderEquals($key, $value, Client $client = null) /** * Asserts the a response header has not the given value. * - * @param string $key The header name * @param string $value The header value + * @param string $key The header name * @param Symfony\Foundation\Client $client A Client instance */ - public function assertResponseNotHeaderEquals($key, $value, Client $client = null) + public function assertResponseNotHeaderEquals($value, $key, Client $client = null) { $headers = explode(', ', $this->getResponse($client)->headers->get($key)); foreach ($headers as $header) { @@ -127,11 +127,11 @@ public function assertResponseNotHeaderEquals($key, $value, Client $client = nul /** * Asserts the response header matches the given regexp. * - * @param string $key The header name * @param string $regex A regexp + * @param string $key The header name * @param Symfony\Foundation\Client $client A Client instance */ - public function assertResponseHeaderRegExp($key, $regex, Client $client = null) + public function assertResponseHeaderRegExp($regex, $key, Client $client = null) { $headers = explode(', ', $this->getResponse($client)->headers->get($key)); foreach ($headers as $header) { @@ -146,11 +146,11 @@ public function assertResponseHeaderRegExp($key, $regex, Client $client = null) /** * Asserts the response header does not match the given regexp. * - * @param string $key The header name * @param string $regex A regexp + * @param string $key The header name * @param Symfony\Foundation\Client $client A Client instance */ - public function assertResponseNotHeaderRegExp($key, $regex, Client $client = null) + public function assertResponseNotHeaderRegExp($regex, $key, Client $client = null) { $headers = explode(', ', $this->getResponse($client)->headers->get($key)); foreach ($headers as $header) { @@ -165,12 +165,12 @@ public function assertResponseNotHeaderRegExp($key, $regex, Client $client = nul /** * Asserts if a cookie was set with the given value and attributes. * - * @param string $name The cookie name * @param string $value The cookie value * @param array $attributes Other cookie attributes to check (expires, path, domain, etc) + * @param string $name The cookie name * @param Symfony\Foundation\Client $client A Client instance */ - public function assertResponseCookie($name, $value = null, $attributes = array(), Client $client = null) + public function assertResponseCookie($value, $attributes = array(), $name, Client $client = null) { foreach ($this->getResponse($client)->getCookies() as $cookie) { if ($name == $cookie['name']) {