2017 © Pedro Peláez
 

library tests

image

zoomyboy/tests

  • Sunday, July 8, 2018
  • by zoomyboy
  • Repository
  • 1 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 9 % Grown

The README.md

Laravel test helpers

Checking Authorization

You can check authorization with the ChecksAuthorization Trait, (*1)

    use ChecksAuthorization;

    ...

    $this->assertRequestDenies(new Request($get, $post));
    $this->assertRequestGrants(new Request($get, $post));

User mocking

You can fake a currently authenticated usser and set its Rights:, (*2)

public $fakeUserModel = \App\User::class;

...

$this->mockUser(array $rights);

$rights is an array with all the right keys of this user. You should set the fakeUserModel on the test class to resolve the user (which is \App\User by default), (*3)

The Versions

08/07 2018

dev-master

9999999-dev

  Sources   Download

by Philipp Lang

18/03 2018

0.0.8

0.0.8.0

  Sources   Download

by Philipp Lang

20/02 2018

0.0.7

0.0.7.0

  Sources   Download

by Philipp Lang

08/02 2018

0.0.6

0.0.6.0

  Sources   Download

by Philipp Lang

05/02 2018

0.0.5

0.0.5.0

  Sources   Download

by Philipp Lang

03/02 2018

0.0.4

0.0.4.0

  Sources   Download

by Philipp Lang

07/01 2018

0.0.3

0.0.3.0

  Sources   Download

by Philipp Lang

07/01 2018

0.0.2

0.0.2.0

  Sources   Download

by Philipp Lang

23/11 2017

0.0.1

0.0.1.0

  Sources   Download

by Philipp Lang