Skip to content

Commit

Permalink
Merge pull request #1072 from BackEndTea/enhancement/remove-has-permi…
Browse files Browse the repository at this point in the history
…ssion

Remove hasPermission mock
  • Loading branch information
localheinz committed Jan 10, 2018
2 parents 31364b4 + 222698c commit fb83a22
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions tests/Integration/WebTestCase.php
Expand Up @@ -174,9 +174,7 @@ final protected function asLoggedInSpeaker(int $id): self
$user->shouldReceive('id')->andReturn($id);
$user->shouldReceive('getId')->andReturn($id);
$user->shouldReceive('hasAccess')->with('admin')->andReturn(false);
$user->shouldReceive('hasPermission')->with('admin')->andReturn(false);
$user->shouldReceive('hasAccess')->with('reviewer')->andReturn(false);
$user->shouldReceive('hasPermission')->with('reviewer')->andReturn(false);
$user->shouldReceive('getLogin')->andReturn('my@email.com');

/** @var MockAuthentication $authentication */
Expand All @@ -196,9 +194,7 @@ final protected function asAdmin(int $id): self
$user->shouldReceive('id')->andReturn($id);
$user->shouldReceive('getId')->andReturn($id);
$user->shouldReceive('hasAccess')->with('admin')->andReturn(true);
$user->shouldReceive('hasPermission')->with('admin')->andReturn(true);
$user->shouldReceive('hasAccess')->with('reviewer')->andReturn(false);
$user->shouldReceive('hasPermission')->with('reviewer')->andReturn(false);

/** @var MockAuthentication $authentication */
$authentication = $this->container->get(Authentication::class);
Expand All @@ -217,9 +213,7 @@ final protected function asReviewer(int $id): self
$user->shouldReceive('id')->andReturn($id);
$user->shouldReceive('getId')->andReturn($id);
$user->shouldReceive('hasAccess')->with('admin')->andReturn(false);
$user->shouldReceive('hasPermission')->with('admin')->andReturn(false);
$user->shouldReceive('hasAccess')->with('reviewer')->andReturn(true);
$user->shouldReceive('hasPermission')->with('reviewer')->andReturn(true);

/** @var MockAuthentication $authentication */
$authentication = $this->container->get(Authentication::class);
Expand Down

0 comments on commit fb83a22

Please sign in to comment.