Laracasts\Behat\Context\KernelAwareInitializer::rebootKernel PHP Method

rebootKernel() public method

After each scenario, reboot the kernel.
public rebootKernel ( )
    public function rebootKernel()
    {
        if ($this->context instanceof KernelAwareContext) {
            $this->kernel->flush();
            $laravel = new LaravelBooter($this->kernel->basePath(), $this->kernel->environmentFile());
            $this->context->getSession('laravel')->getDriver()->reboot($this->kernel = $laravel->boot());
            $this->setAppOnContext();
        }
    }