X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FOutput%2FStatistics%2FStepStatV2.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FOutput%2FStatistics%2FStepStatV2.php;h=ae13fc6bf32176b14be07c9d90035e6372047e78;hp=0000000000000000000000000000000000000000;hb=1270d9129ce8f27c9b28b10518e32132c58e0aca;hpb=c27c0f0cdaa3f354b1fe54a56ae7e854be6e3f68 diff --git a/vendor/behat/behat/src/Behat/Behat/Output/Statistics/StepStatV2.php b/vendor/behat/behat/src/Behat/Behat/Output/Statistics/StepStatV2.php new file mode 100644 index 000000000..ae13fc6bf --- /dev/null +++ b/vendor/behat/behat/src/Behat/Behat/Output/Statistics/StepStatV2.php @@ -0,0 +1,152 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Behat\Behat\Output\Statistics; + +/** + * Second iteration of Behat step stat, with a scenario information. + * + * @author Konstantin Kudryashov + */ +final class StepStatV2 extends StepStat +{ + /** + * @var string + */ + private $scenarioTitle; + /** + * @var string + */ + private $scenarioPath; + /** + * @var string + */ + private $stepText; + /** + * @var string + */ + private $stepPath; + /** + * @var integer + */ + private $resultCode; + /** + * @var null|string + */ + private $error; + /** + * @var null|string + */ + private $stdOut; + + /** + * Initializes step stat. + * + * @param string $scenarioTitle + * @param string $scenarioPath + * @param string $stepText + * @param string $stepPath + * @param integer $resultCode + * @param null|string $error + * @param null|string $stdOut + */ + public function __construct($scenarioTitle, $scenarioPath, $stepText, $stepPath, $resultCode, $error = null, $stdOut = null) + { + parent::__construct($stepText, $stepPath, $resultCode, $error, $stdOut); + + $this->scenarioTitle = $scenarioTitle; + $this->scenarioPath = $scenarioPath; + $this->stepText = $stepText; + $this->stepPath = $stepPath; + $this->resultCode = $resultCode; + $this->error = $error; + $this->stdOut = $stdOut; + } + + /** + * Returns associated scenario text. + * + * @return string + */ + public function getScenarioText() + { + return $this->scenarioTitle; + } + + /** + * Returns associated scenario path. + * + * @return string + */ + public function getScenarioPath() + { + return $this->scenarioPath; + } + + /** + * Returns step text. + * + * @return string + */ + public function getStepText() + { + return $this->stepText; + } + + /** + * Returns step path. + * + * @return string + */ + public function getStepPath() + { + return $this->stepPath; + } + + /** + * Returns step result code. + * + * @return integer + */ + public function getResultCode() + { + return $this->resultCode; + } + + /** + * Returns step error (if has one). + * + * @return null|string + */ + public function getError() + { + return $this->error; + } + + /** + * Returns step output (if has one). + * + * @return null|string + */ + public function getStdOut() + { + return $this->stdOut; + } + + /** + * Returns string representation for a stat. + * + * @return string + */ + public function __toString() + { + return $this->getPath(); + } +}