4 * This file is part of the Behat MinkExtension.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\MinkExtension\ServiceContainer\Driver;
13 use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
14 use Symfony\Component\DependencyInjection\Definition;
16 class ZombieFactory implements DriverFactory
21 public function getDriverName()
29 public function supportsJavascript()
37 public function configure(ArrayNodeDefinition $builder)
41 ->scalarNode('host')->defaultValue('127.0.0.1')->end()
42 ->scalarNode('port')->defaultValue(8124)->end()
43 ->scalarNode('node_bin')->defaultValue('node')->end()
44 ->scalarNode('server_path')->defaultNull()->end()
45 ->scalarNode('threshold')->defaultValue(2000000)->end()
46 ->scalarNode('node_modules_path')->defaultValue('')->end()
54 public function buildDriver(array $config)
56 if (!class_exists('Behat\Mink\Driver\ZombieDriver')) {
57 throw new \RuntimeException(
58 'Install MinkZombieDriver in order to use zombie driver.'
62 return new Definition('Behat\Mink\Driver\ZombieDriver', array(
63 new Definition('Behat\Mink\Driver\NodeJS\Server\ZombieServer', array(
67 $config['server_path'],
69 $config['node_modules_path'],