Completed
Push — master ( 330635...475330 )
by Jonathan
11s
created

MinkExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 26
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 12 1
1
<?php
2
3
namespace Drupal\MinkExtension\ServiceContainer;
4
5
use Behat\MinkExtension\ServiceContainer\MinkExtension as BaseMinkExtension;
6
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
7
8
class MinkExtension extends BaseMinkExtension
9
{
10
11
    /**
12
     * Default wait time for AJAX to finish (in seconds).
13
     *
14
     * @var int
15
     */
16
    const AJAX_TIMEOUT = 5;
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function configure(ArrayNodeDefinition $builder)
22
    {
23
        parent::configure($builder);
24
25
        // Add extended options.
26
        $builder->
27
        children()->
28
        scalarNode('ajax_timeout')->
29
            defaultValue(static::AJAX_TIMEOUT)->
30
            info(sprintf('Change the maximum time to wait for AJAX calls to complete. Defaults to %s seconds.', static::AJAX_TIMEOUT))->
31
        end();
32
    }
33
}
34