X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FEventDispatcher%2FEvent%2FAfterBackgroundTested.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FEventDispatcher%2FEvent%2FAfterBackgroundTested.php;h=76e15774c7f07a7609bb615518fd6d1d8a1cc101;hb=1270d9129ce8f27c9b28b10518e32132c58e0aca;hp=0000000000000000000000000000000000000000;hpb=c27c0f0cdaa3f354b1fe54a56ae7e854be6e3f68;p=yaffs-website diff --git a/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Event/AfterBackgroundTested.php b/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Event/AfterBackgroundTested.php new file mode 100644 index 000000000..76e15774c --- /dev/null +++ b/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Event/AfterBackgroundTested.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Behat\Behat\EventDispatcher\Event; + +use Behat\Gherkin\Node\BackgroundNode; +use Behat\Gherkin\Node\FeatureNode; +use Behat\Gherkin\Node\ScenarioInterface; +use Behat\Testwork\Environment\Environment; +use Behat\Testwork\EventDispatcher\Event\AfterTested; +use Behat\Testwork\Tester\Result\TestResult; +use Behat\Testwork\Tester\Setup\Teardown; + +/** + * Represents an event in which background was tested. + * + * @author Konstantin Kudryashov + */ +final class AfterBackgroundTested extends BackgroundTested implements AfterTested +{ + /** + * @var FeatureNode + */ + private $feature; + /** + * @var BackgroundNode + */ + private $background; + /** + * @var TestResult + */ + private $result; + /** + * @var Teardown + */ + private $teardown; + + /** + * Initializes event. + * + * @param Environment $env + * @param FeatureNode $feature + * @param BackgroundNode $background + * @param TestResult $result + * @param Teardown $teardown + */ + public function __construct( + Environment $env, + FeatureNode $feature, + BackgroundNode $background, + TestResult $result, + Teardown $teardown + ) { + parent::__construct($env); + + $this->feature = $feature; + $this->background = $background; + $this->result = $result; + $this->teardown = $teardown; + } + + /** + * Returns feature. + * + * @return FeatureNode + */ + public function getFeature() + { + return $this->feature; + } + + /** + * Returns scenario node. + * + * @return ScenarioInterface + */ + public function getScenario() + { + return $this->background; + } + + /** + * Returns background node. + * + * @return BackgroundNode + */ + public function getBackground() + { + return $this->background; + } + + /** + * Returns current test result. + * + * @return TestResult + */ + public function getTestResult() + { + return $this->result; + } + + /** + * Returns current test teardown. + * + * @return Teardown + */ + public function getTeardown() + { + return $this->teardown; + } +}