4 * This file is part of the Behat.
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\Behat\HelperContainer\Environment;
13 use Behat\Testwork\Environment\Environment;
14 use Psr\Container\ContainerInterface;
17 * Represents test environment based on a service locator pattern.
19 * @see ContextEnvironmentHandler
21 * @author Konstantin Kudryashov <ever.zet@gmail.com>
23 interface ServiceContainerEnvironment extends Environment
26 * Sets/unsets service container for the environment.
28 * @param ContainerInterface|null $container
30 public function setServiceContainer(ContainerInterface $container = null);
33 * Returns environment service container if set.
35 * @return null|ContainerInterface
37 public function getServiceContainer();