PATH:
home
/
lab2454c
/
westernclear.net
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Foundation
/
Testing
<?php namespace Illuminate\Foundation\Testing; trait LazilyRefreshDatabase { use RefreshDatabase { refreshDatabase as baseRefreshDatabase; } /** * Define hooks to migrate the database before and after each test. * * @return void */ public function refreshDatabase() { $database = $this->app->make('db'); $database->beforeExecuting(function () { if (RefreshDatabaseState::$lazilyRefreshed) { return; } RefreshDatabaseState::$lazilyRefreshed = true; $this->baseRefreshDatabase(); }); $this->beforeApplicationDestroyed(function () { RefreshDatabaseState::$lazilyRefreshed = false; }); } }
[-] LazilyRefreshDatabase.php
[edit]
[-] TestCase.php
[edit]
[+]
..
[-] DatabaseTransactions.php
[edit]
[-] RefreshDatabaseState.php
[edit]
[-] WithoutMiddleware.php
[edit]
[-] WithFaker.php
[edit]
[-] RefreshDatabase.php
[edit]
[-] WithoutEvents.php
[edit]
[-] DatabaseMigrations.php
[edit]
[+]
Traits
[+]
Concerns
[-] Wormhole.php
[edit]