4 * This file is part of the Behat Testwork.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Testwork\Environment\Handler;
13 use Behat\Testwork\Environment\Environment;
14 use Behat\Testwork\Environment\EnvironmentManager;
15 use Behat\Testwork\Suite\Suite;
18 * Handles test environment building and isolation.
20 * @see EnvironmentManager
22 * @author Konstantin Kudryashov <ever.zet@gmail.com>
24 interface EnvironmentHandler
27 * Checks if handler supports provided suite.
33 public function supportsSuite(Suite $suite);
36 * Builds environment object based on provided suite.
42 public function buildEnvironment(Suite $suite);
45 * Checks if handler supports provided environment.
47 * @param Environment $environment
48 * @param mixed $testSubject
52 public function supportsEnvironmentAndSubject(Environment $environment, $testSubject = null);
55 * Isolates provided environment.
57 * @param Environment $environment
58 * @param mixed $testSubject
62 public function isolateEnvironment(Environment $environment, $testSubject = null);