X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FHook%2FTester%2FHookableFeatureTester.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FHook%2FTester%2FHookableFeatureTester.php;h=0000000000000000000000000000000000000000;hp=288c6c006a5140efa40821ac1be10d74048a6261;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableFeatureTester.php b/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableFeatureTester.php deleted file mode 100644 index 288c6c006..000000000 --- a/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableFeatureTester.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Behat\Behat\Hook\Tester; - -use Behat\Behat\Hook\Scope\AfterFeatureScope; -use Behat\Behat\Hook\Scope\BeforeFeatureScope; -use Behat\Testwork\Environment\Environment; -use Behat\Testwork\Hook\HookDispatcher; -use Behat\Testwork\Hook\Tester\Setup\HookedSetup; -use Behat\Testwork\Hook\Tester\Setup\HookedTeardown; -use Behat\Testwork\Tester\Result\TestResult; -use Behat\Testwork\Tester\SpecificationTester; - -/** - * Feature tester which dispatches hooks during its execution. - * - * @author Konstantin Kudryashov - */ -final class HookableFeatureTester implements SpecificationTester -{ - /** - * @var SpecificationTester - */ - private $baseTester; - /** - * @var HookDispatcher - */ - private $hookDispatcher; - - /** - * Initializes tester. - * - * @param SpecificationTester $baseTester - * @param HookDispatcher $hookDispatcher - */ - public function __construct(SpecificationTester $baseTester, HookDispatcher $hookDispatcher) - { - $this->baseTester = $baseTester; - $this->hookDispatcher = $hookDispatcher; - } - - /** - * {@inheritdoc} - */ - public function setUp(Environment $env, $spec, $skip) - { - $setup = $this->baseTester->setUp($env, $spec, $skip); - - if ($skip) { - return $setup; - } - - $scope = new BeforeFeatureScope($env, $spec); - $hookCallResults = $this->hookDispatcher->dispatchScopeHooks($scope); - - return new HookedSetup($setup, $hookCallResults); - } - - /** - * {@inheritdoc} - */ - public function test(Environment $env, $spec, $skip) - { - return $this->baseTester->test($env, $spec, $skip); - } - - /** - * {@inheritdoc} - */ - public function tearDown(Environment $env, $spec, $skip, TestResult $result) - { - $teardown = $this->baseTester->tearDown($env, $spec, $skip, $result); - - if ($skip) { - return $teardown; - } - - $scope = new AfterFeatureScope($env, $spec, $result); - $hookCallResults = $this->hookDispatcher->dispatchScopeHooks($scope); - - return new HookedTeardown($teardown, $hookCallResults); - } -}