mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-18 05:02:14 +01:00
Prevent stray requests in unit tests
This commit is contained in:
committed by
Constantin Graf
parent
0c1f06face
commit
0ee0175f04
@@ -38,5 +38,6 @@
|
|||||||
<env name="SESSION_DRIVER" value="array"/>
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
<env name="TELESCOPE_ENABLED" value="false"/>
|
<env name="TELESCOPE_ENABLED" value="false"/>
|
||||||
<env name="AUDITING_ENABLED" value="true"/>
|
<env name="AUDITING_ENABLED" value="true"/>
|
||||||
|
<env name="NEWSLETTER_URL" value="null"/>
|
||||||
</php>
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ use Carbon\CarbonImmutable;
|
|||||||
use Illuminate\Database\Eloquent\Collection;
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Mockery\MockInterface;
|
use Mockery\MockInterface;
|
||||||
@@ -25,6 +26,7 @@ abstract class TestCase extends BaseTestCase
|
|||||||
parent::setUp();
|
parent::setUp();
|
||||||
Mail::fake();
|
Mail::fake();
|
||||||
LogFake::bind();
|
LogFake::bind();
|
||||||
|
Http::preventStrayRequests();
|
||||||
$this->actAsOrganizationWithoutSubscriptionAndWithoutTrial();
|
$this->actAsOrganizationWithoutSubscriptionAndWithoutTrial();
|
||||||
// Note: The following line can be used to test timezone edge cases.
|
// Note: The following line can be used to test timezone edge cases.
|
||||||
// $this->travelTo(Carbon::now()->timezone('Europe/Vienna')->setHour(0)->setMinute(59)->setSecond(0));
|
// $this->travelTo(Carbon::now()->timezone('Europe/Vienna')->setHour(0)->setMinute(59)->setSecond(0));
|
||||||
|
|||||||
Reference in New Issue
Block a user