X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FTester%2FStepContainerTester.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FTester%2FStepContainerTester.php;h=0000000000000000000000000000000000000000;hp=543e133d2fab5601d03d166978b878a1b2a5c397;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/behat/behat/src/Behat/Behat/Tester/StepContainerTester.php b/vendor/behat/behat/src/Behat/Behat/Tester/StepContainerTester.php deleted file mode 100644 index 543e133d2..000000000 --- a/vendor/behat/behat/src/Behat/Behat/Tester/StepContainerTester.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Behat\Behat\Tester; - -use Behat\Gherkin\Node\FeatureNode; -use Behat\Gherkin\Node\StepContainerInterface; -use Behat\Testwork\Environment\Environment; -use Behat\Testwork\Tester\Result\IntegerTestResult; -use Behat\Testwork\Tester\Result\TestResult; -use Behat\Testwork\Tester\Result\TestWithSetupResult; - -/** - * Tests provided collection of steps against provided environment. - * - * @author Konstantin Kudryashov - */ -final class StepContainerTester -{ - /** - * @var StepTester - */ - private $stepTester; - - /** - * Initializes tester. - * - * @param StepTester $stepTester - */ - public function __construct(StepTester $stepTester) - { - $this->stepTester = $stepTester; - } - - /** - * Tests container. - * - * @param Environment $env - * @param FeatureNode $feature - * @param StepContainerInterface $container - * @param Boolean $skip - * - * @return TestResult[] - */ - public function test(Environment $env, FeatureNode $feature, StepContainerInterface $container, $skip) - { - $results = array(); - foreach ($container->getSteps() as $step) { - $setup = $this->stepTester->setUp($env, $feature, $step, $skip); - $skipSetup = !$setup->isSuccessful() || $skip; - - $testResult = $this->stepTester->test($env, $feature, $step, $skipSetup); - $skip = !$testResult->isPassed() || $skip; - - $teardown = $this->stepTester->tearDown($env, $feature, $step, $skipSetup, $testResult); - $skip = $skip || $skipSetup || !$teardown->isSuccessful(); - - $integerResult = new IntegerTestResult($testResult->getResultCode()); - $results[] = new TestWithSetupResult($setup, $integerResult, $teardown); - } - - return $results; - } -}