New Branch Structure
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
use Laravel\Fortify\Features;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
/**
|
||||
* Ensure Laravel is bootstrapped in the testing environment even when
|
||||
* `php artisan test` is launched from an application using APP_ENV=local.
|
||||
*/
|
||||
public function createApplication()
|
||||
{
|
||||
putenv('APP_ENV=testing');
|
||||
$_ENV['APP_ENV'] = 'testing';
|
||||
$_SERVER['APP_ENV'] = 'testing';
|
||||
|
||||
return parent::createApplication();
|
||||
}
|
||||
|
||||
protected function skipUnlessFortifyHas(string $feature, ?string $message = null): void
|
||||
{
|
||||
if (! Features::enabled($feature)) {
|
||||
$this->markTestSkipped($message ?? "Fortify feature [{$feature}] is not enabled.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user