Skip to content

Instantly share code, notes, and snippets.

@tkaratug
Created April 24, 2022 11:44
Show Gist options
  • Save tkaratug/16ec90e34296a6f0bbf2e6051f371972 to your computer and use it in GitHub Desktop.
Save tkaratug/16ec90e34296a6f0bbf2e6051f371972 to your computer and use it in GitHub Desktop.
<?php
namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Event;
use App\Events\ModelScopeCalled;
use HasScopeAssertion;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
use HasScopeAssertion;
public function setUp(): void
{
parent::setUp();
Event::fake([ModelScopeCalled::class]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment