laravel-test-assertions
laravel-test-assertions copied to clipboard
FR: pass array for method in `assertActionUsesMiddleware`
trafficstars
I currently have this in a test:
public function controller_uses_middleware()
{
$this->assertActionUsesMiddleware(SubscriptionController::class, 'store', 'auth');
$this->assertActionUsesMiddleware(SubscriptionController::class, 'update', 'auth');
$this->assertActionUsesMiddleware(SubscriptionController::class, 'destroy', 'auth');
}
Would be great if I could do:
public function controller_uses_middleware()
{
$this->assertActionUsesMiddleware(SubscriptionController::class, ['store, 'update', 'destroy',] 'auth');
}
Once I get a bit more comfortable with this, I'll take a crack at a PR.
https://github.com/jasonmccreary/laravel-test-assertions/pull/3
I think this is asking for the second parameter (action) to also allow an array.
Ooofff. Completely right! My bad!