Created
October 14, 2020 04:32
-
-
Save phanlyhuynh/735f8f1872e7ae6c0b224b6e55712507 to your computer and use it in GitHub Desktop.
Unit test: pass authorize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$mock = Mockery::mock(Illuminate\Contracts\Auth\Access\Gate::class); | |
$mock->shouldReceive('authorize')->once()->andReturn(true); | |
$mock->shouldReceive('allows')->once()->andReturn(true); | |
$this->app[Gate::class] = $mock; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment