X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FTestwork%2FEnvironment%2FException%2FEnvironmentIsolationException.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FTestwork%2FEnvironment%2FException%2FEnvironmentIsolationException.php;h=6f517aed55fc0c212f0ce1b8723a6ab81140b473;hp=0000000000000000000000000000000000000000;hb=1270d9129ce8f27c9b28b10518e32132c58e0aca;hpb=c27c0f0cdaa3f354b1fe54a56ae7e854be6e3f68 diff --git a/vendor/behat/behat/src/Behat/Testwork/Environment/Exception/EnvironmentIsolationException.php b/vendor/behat/behat/src/Behat/Testwork/Environment/Exception/EnvironmentIsolationException.php new file mode 100644 index 000000000..6f517aed5 --- /dev/null +++ b/vendor/behat/behat/src/Behat/Testwork/Environment/Exception/EnvironmentIsolationException.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Behat\Testwork\Environment\Exception; + +use Behat\Testwork\Environment\Environment; +use RuntimeException; + +/** + * Represents exception thrown during environment isolation process. + * + * @author Konstantin Kudryashov + */ +final class EnvironmentIsolationException extends RuntimeException implements EnvironmentException +{ + /** + * @var Environment + */ + private $environment; + /** + * @var mixed + */ + private $subject; + + /** + * Initializes exception. + * + * @param string $message + * @param Environment $environment + * @param mixed $testSubject + */ + public function __construct($message, Environment $environment, $testSubject = null) + { + $this->environment = $environment; + $this->subject = $testSubject; + + parent::__construct($message); + } + + /** + * Returns environment that caused exception. + * + * @return Environment + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Returns test subject that caused exception. + * + * @return mixed + */ + public function getSubject() + { + return $this->subject; + } +}