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\EventDispatcher\Event;
13 use Behat\Testwork\Environment\Environment;
14 use Behat\Testwork\Suite\Suite;
15 use Symfony\Component\EventDispatcher\Event;
18 * Represents an event which holds references to current suite and environment.
20 * @author Konstantin Kudryashov <ever.zet@gmail.com>
22 abstract class LifecycleEvent extends Event
30 * Initializes scenario event.
32 * @param Environment $env
34 public function __construct(Environment $env)
36 $this->environment = $env;
40 * Returns suite in which this event was fired.
44 public function getSuite()
46 return $this->environment->getSuite();
50 * Returns environment in which this event was fired.
54 public function getEnvironment()
56 return $this->environment;