10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9006b9d commit 43e848eCopy full SHA for 43e848e
tests/CacheTest.php
@@ -203,6 +203,17 @@ public function get_all_permissions_should_use_the_cache()
203
$this->assertQueryCount(2);
204
}
205
206
+ /** @test */
207
+ public function get_all_permissions_should_not_over_hydrate_roles()
208
+ {
209
+ $this->testUserRole->givePermissionTo(['edit-articles', 'edit-news']);
210
+ $permissions = $this->registrar->getPermissions();
211
+ $roles = $permissions->flatMap->roles;
212
+
213
+ // Should have same object reference
214
+ $this->assertSame($roles[0], $roles[1]);
215
+ }
216
217
/** @test */
218
public function it_can_reset_the_cache_with_artisan_command()
219
{
0 commit comments