Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Testwork / Environment / Handler / EnvironmentHandler.php
1 <?php
2
3 /*
4  * This file is part of the Behat Testwork.
5  * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 namespace Behat\Testwork\Environment\Handler;
12
13 use Behat\Testwork\Environment\Environment;
14 use Behat\Testwork\Environment\EnvironmentManager;
15 use Behat\Testwork\Suite\Suite;
16
17 /**
18  * Handles test environment building and isolation.
19  *
20  * @see EnvironmentManager
21  *
22  * @author Konstantin Kudryashov <ever.zet@gmail.com>
23  */
24 interface EnvironmentHandler
25 {
26     /**
27      * Checks if handler supports provided suite.
28      *
29      * @param Suite $suite
30      *
31      * @return Boolean
32      */
33     public function supportsSuite(Suite $suite);
34
35     /**
36      * Builds environment object based on provided suite.
37      *
38      * @param Suite $suite
39      *
40      * @return Environment
41      */
42     public function buildEnvironment(Suite $suite);
43
44     /**
45      * Checks if handler supports provided environment.
46      *
47      * @param Environment $environment
48      * @param mixed       $testSubject
49      *
50      * @return Boolean
51      */
52     public function supportsEnvironmentAndSubject(Environment $environment, $testSubject = null);
53
54     /**
55      * Isolates provided environment.
56      *
57      * @param Environment $environment
58      * @param mixed       $testSubject
59      *
60      * @return Environment
61      */
62     public function isolateEnvironment(Environment $environment, $testSubject = null);
63 }