remove testing bootstrap extension (#5107)
This commit is contained in:
parent
cba8d19f86
commit
42e864f3f5
|
@ -22,9 +22,6 @@
|
||||||
<directory suffix=".php">./app</directory>
|
<directory suffix=".php">./app</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
<extensions>
|
|
||||||
<extension class="Tests\Bootstrap"/>
|
|
||||||
</extensions>
|
|
||||||
<php>
|
<php>
|
||||||
<server name="APP_ENV" value="testing"/>
|
<server name="APP_ENV" value="testing"/>
|
||||||
<server name="BCRYPT_ROUNDS" value="4"/>
|
<server name="BCRYPT_ROUNDS" value="4"/>
|
||||||
|
@ -32,10 +29,5 @@
|
||||||
<server name="MAIL_DRIVER" value="array"/>
|
<server name="MAIL_DRIVER" value="array"/>
|
||||||
<server name="QUEUE_CONNECTION" value="sync"/>
|
<server name="QUEUE_CONNECTION" value="sync"/>
|
||||||
<server name="SESSION_DRIVER" value="array"/>
|
<server name="SESSION_DRIVER" value="array"/>
|
||||||
<server name="APP_CONFIG_CACHE" value="bootstrap/cache/config.phpunit.php"/>
|
|
||||||
<server name="APP_SERVICES_CACHE" value="bootstrap/cache/services.phpunit.php"/>
|
|
||||||
<server name="APP_PACKAGES_CACHE" value="bootstrap/cache/packages.phpunit.php"/>
|
|
||||||
<server name="APP_ROUTES_CACHE" value="bootstrap/cache/routes.phpunit.php"/>
|
|
||||||
<server name="APP_EVENTS_CACHE" value="bootstrap/cache/events.phpunit.php"/>
|
|
||||||
</php>
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Tests;
|
|
||||||
|
|
||||||
use Illuminate\Contracts\Console\Kernel;
|
|
||||||
use PHPUnit\Runner\AfterLastTestHook;
|
|
||||||
use PHPUnit\Runner\BeforeFirstTestHook;
|
|
||||||
|
|
||||||
class Bootstrap implements BeforeFirstTestHook, AfterLastTestHook
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Bootstrap The Test Environment
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| You may specify console commands that execute once before your test is
|
|
||||||
| run. You are free to add your own additional commands or logic into
|
|
||||||
| this file as needed in order to help your test suite run quicker.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
use CreatesApplication;
|
|
||||||
|
|
||||||
public function executeBeforeFirstTest(): void
|
|
||||||
{
|
|
||||||
$console = $this->createApplication()->make(Kernel::class);
|
|
||||||
|
|
||||||
$commands = [
|
|
||||||
'config:cache',
|
|
||||||
'event:cache',
|
|
||||||
];
|
|
||||||
|
|
||||||
foreach ($commands as $command) {
|
|
||||||
$console->call($command);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function executeAfterLastTest(): void
|
|
||||||
{
|
|
||||||
array_map('unlink', glob('bootstrap/cache/*.phpunit.php'));
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue