for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* This file is part of Laravel Zero.
*
* (c) Nuno Maduro <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LaravelZero\Framework\Testing;
use Illuminate\Support\Facades\Facade;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
* Setup the test environment.
protected function setUp(): void
if (! $this->app) {
$this->refreshApplication();
}
$this->setUpTraits();
foreach ($this->afterApplicationCreatedCallbacks as $callback) {
call_user_func($callback);
Facade::clearResolvedInstances();
if (class_exists(\Illuminate\Database\Eloquent\Model::class)) {
\Illuminate\Database\Eloquent\Model::setEventDispatcher($this->app['events']);
$this->setUpHasRun = true;