for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Robertfausk\Behat\PantherExtension\ServiceContainer\Driver;
use Behat\MinkExtension\ServiceContainer\Driver\DriverFactory;
use Robertfausk\Behat\PantherExtension\ServiceContainer\PantherConfiguration;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\DependencyInjection\Definition;
/**
* @author Robert Freigang <[email protected]>
*/
class PantherFactory implements DriverFactory
{
* {@inheritdoc}
public function getDriverName()
return 'panther';
}
public function supportsJavascript()
return true;
public function configure(ArrayNodeDefinition $builder)
$configuration = new PantherConfiguration();
$builder->append($configuration->addOptionsNode());
public function buildDriver(array $config)
if (!class_exists('Behat\Mink\Driver\PantherDriver')) {
throw new \RuntimeException(
'Install MinkPantherDriver in order to use panther driver.'
);
return new Definition(
'Behat\Mink\Driver\PantherDriver',
array(
$config['options'] ?? [],
)