Skip to content

Instantly share code, notes, and snippets.

@deleugpn
Created October 13, 2017 21:39
Show Gist options
  • Select an option

  • Save deleugpn/bce3a037514deccaca9319699388dcbf to your computer and use it in GitHub Desktop.

Select an option

Save deleugpn/bce3a037514deccaca9319699388dcbf to your computer and use it in GitHub Desktop.
<?php
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
if ($app->configurationIsCached()) {
throw new RuntimeException('Your configuration is cached. Any variable in phpunit.xml did not take effect.');
}
$app->make(Kernel::class)->bootstrap();
$this->protectDatabase();
return $app;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment