Elcodi\Bridge\BehatBridgeBundle\DoctrineContext::cleanDB PHP Method

cleanDB() public method

public cleanDB ( Behat\Behat\Hook\Scope\AfterScenarioScope $scope )
$scope Behat\Behat\Hook\Scope\AfterScenarioScope
    public function cleanDB(AfterScenarioScope $scope)
    {
        $container = $this->getContainer();
        $container->get('doctrine')->getConnection()->close();
        // to remove if tests move from sqlite to *
        $params = $container->get('doctrine')->getConnection()->getParams();
        unlink($params['path']);
        // to restore if tests move from sqlite to *
        // $this
        //     ->application
        //     ->run(new ArrayInput([
        //         'command'          => 'doctrine:database:drop',
        //         '--env'            => 'test',
        //         '--no-interaction' => true,
        //         '--force'          => true,
        //         '--quiet'          => true,
        //     ]));
    }