Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HttpKernel] Make WebTestCase::createClient() method throw an Exception i #1351

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/Symfony/Component/HttpKernel/Test/WebTestCase.php
Expand Up @@ -24,10 +24,20 @@ abstract class WebTestCase extends \PHPUnit_Framework_TestCase
/**
* Creates a Client.
*
* The method can't be declared abstract and static at the same time because
* it produces a Strict Standards notice since PHP 5.3 and Late Static Binding
* implementation. That's why, it throws a \LogicException and must be
* overriden by a more specific class.
*
* @param array $options An array of options to pass to the createKernel class
* @param array $server An array of server parameters
*
* @return Client A Client instance
*
* @throws \LogicException
*/
abstract static protected function createClient(array $options = array(), array $server = array());
static protected function createClient(array $options = array(), array $server = array())
{
throw new \LogicException('WebTestCase::createClient() must be overriden in a more specific class.');
}
}