[BrowserKit] Check class existence only when required.

This commit is contained in:
Jerome Tamarelle 2012-05-03 09:50:46 +02:00
parent 34a0c7a635
commit 970d0b4ddb

View File

@ -84,7 +84,7 @@ abstract class Client
*/
public function insulate($insulated = true)
{
if (!class_exists('Symfony\\Component\\Process\\Process')) {
if ($insulated && !class_exists('Symfony\\Component\\Process\\Process')) {
// @codeCoverageIgnoreStart
throw new \RuntimeException('Unable to isolate requests as the Symfony Process Component is not installed.');
// @codeCoverageIgnoreEnd