X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FHook%2FScope%2FAfterStepScope.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FHook%2FScope%2FAfterStepScope.php;h=54d63f06b2290aa2689f78051830f0ff54fe03af;hp=0000000000000000000000000000000000000000;hb=1270d9129ce8f27c9b28b10518e32132c58e0aca;hpb=c27c0f0cdaa3f354b1fe54a56ae7e854be6e3f68 diff --git a/vendor/behat/behat/src/Behat/Behat/Hook/Scope/AfterStepScope.php b/vendor/behat/behat/src/Behat/Behat/Hook/Scope/AfterStepScope.php new file mode 100644 index 000000000..54d63f06b --- /dev/null +++ b/vendor/behat/behat/src/Behat/Behat/Hook/Scope/AfterStepScope.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Behat\Behat\Hook\Scope; + +use Behat\Behat\Tester\Result\StepResult; +use Behat\Gherkin\Node\FeatureNode; +use Behat\Gherkin\Node\StepNode; +use Behat\Testwork\Environment\Environment; +use Behat\Testwork\Hook\Scope\AfterTestScope; +use Behat\Testwork\Suite\Suite; +use Behat\Testwork\Tester\Result\TestResult; + +/** + * Represents an AfterStep hook scope. + * + * @author Konstantin Kudryashov + */ +final class AfterStepScope implements StepScope, AfterTestScope +{ + /** + * @var Environment + */ + private $environment; + /** + * @var FeatureNode + */ + private $feature; + /** + * @var StepNode + */ + private $step; + /** + * @var StepResult + */ + private $result; + + /** + * Initializes scope. + * + * @param Environment $env + * @param FeatureNode $feature + * @param StepNode $step + * @param StepResult $result + */ + public function __construct(Environment $env, FeatureNode $feature, StepNode $step, StepResult $result) + { + $this->environment = $env; + $this->feature = $feature; + $this->step = $step; + $this->result = $result; + } + + /** + * Returns hook scope name. + * + * @return string + */ + public function getName() + { + return self::AFTER; + } + + /** + * Returns hook suite. + * + * @return Suite + */ + public function getSuite() + { + return $this->environment->getSuite(); + } + + /** + * Returns hook environment. + * + * @return Environment + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Returns scope feature. + * + * @return FeatureNode + */ + public function getFeature() + { + return $this->feature; + } + + /** + * Returns scope step. + * + * @return StepNode + */ + public function getStep() + { + return $this->step; + } + + /** + * Returns test result. + * + * @return TestResult + */ + public function getTestResult() + { + return $this->result; + } +}