cartalyst / sentinel

A framework agnostic authentication & authorization system.
BSD 3-Clause "New" or "Revised" License
1.51k stars 238 forks source link

Improve Tests #468

Closed 8633brown closed 5 years ago

8633brown commented 5 years ago

Currently some of the tests cant be ran individually i.e:

running vendor/bin/phpunit all tests pass.

running vendor/bin/phpunit tests/IlluminateActivationRepositoryTests.php fails with 1) Cartalyst\Sentinel\tests\IlluminateActivationRepositoryTest::testCreate Error: Call to a member function connection() on null

As far as i can tell, this is because the mocked connection is used from the previous tests rather than the test building it's own mocks. I'm not sure if this is a problem with mockery not closing down correctly?

However this also removes the dependency of other tests passing from most tests. Meaning all tests will run irrelevant of any other test status. Where as previously if some tests failed this could cause other tests to fail.

Ive also modified the throttling tests to match that of the others with the addThrottlingMock method

brunogaspar commented 5 years ago

Top notch work, really appreciate it!

Thanks!!