for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Behat Symfony2Extension
*
* (c) Konstantin Kudryashov <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Behat\Symfony2Extension\ServiceContainer\Driver;
use Behat\MinkExtension\ServiceContainer\Driver\DriverFactory;
use Behat\Symfony2Extension\ServiceContainer\Symfony2Extension;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
/**
* @author Christophe Coevoet <[email protected]>
final class SymfonyFactory implements DriverFactory
{
* {@inheritdoc}
public function getDriverName()
return 'symfony2';
}
public function supportsJavascript()
return false;
public function configure(ArrayNodeDefinition $builder)
public function buildDriver(array $config)
if (!class_exists('Behat\Mink\Driver\BrowserKitDriver')) {
throw new \RuntimeException(
'Install MinkBrowserKitDriver in order to use the symfony2 driver.'
);
return new Definition('Behat\Symfony2Extension\Driver\KernelDriver', array(
new Reference(Symfony2Extension::KERNEL_ID),
'%mink.base_url%',
));