Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / EventDispatcher / Tester / TickingStepTester.php
1 <?php
2
3 /*
4  * This file is part of the Behat.
5  * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 namespace Behat\Behat\EventDispatcher\Tester;
12
13 use Behat\Behat\Tester\Result\StepResult;
14 use Behat\Behat\Tester\StepTester;
15 use Behat\Gherkin\Node\FeatureNode;
16 use Behat\Gherkin\Node\StepNode;
17 use Behat\Testwork\Environment\Environment;
18
19 /**
20  * Enable ticks during step testing to allow SigintController in Testwork
21  * to handle an interupt (on PHP7)
22  *
23  * @see Behat\Testwork\EventDispatcher\Cli\SigintController
24  *
25  * @author Peter Mitchell <peterjmit@gmail.com>
26  */
27 final class TickingStepTester implements StepTester
28 {
29     /**
30      * @var StepTester
31      */
32     private $baseTester;
33
34     /**
35      * Initializes tester.
36      *
37      * @param StepTester  $baseTester
38      */
39     public function __construct(StepTester $baseTester)
40     {
41         $this->baseTester = $baseTester;
42     }
43
44     /**
45      * {@inheritdoc}
46      */
47     public function setUp(Environment $env, FeatureNode $feature, StepNode $step, $skip)
48     {
49         return $this->baseTester->setUp($env, $feature, $step, $skip);
50     }
51
52     /**
53      * {@inheritdoc}
54      */
55     public function test(Environment $env, FeatureNode $feature, StepNode $step, $skip)
56     {
57         declare(ticks = 1);
58
59         return $this->baseTester->test($env, $feature, $step, $skip);
60     }
61
62     /**
63      * {@inheritdoc}
64      */
65     public function tearDown(Environment $env, FeatureNode $feature, StepNode $step, $skip, StepResult $result)
66     {
67         return $this->baseTester->tearDown($env, $feature, $step, $skip, $result);
68     }
69 }