Created
November 14, 2018 20:27
-
-
Save theMadness/267e4f943dc83cfa55b0f71546a5eed2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\AppBundle\DependencyInjection\Compiler; | |
use AppBundle\Security\DeepRoleChecker; | |
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | |
class OverrideServiceCompilerPassTest extends KernelTestCase | |
{ | |
public function testRoleCanEditResourceInjection(): void | |
{ | |
$kernel = static::bootKernel(); | |
$roleChecker = $kernel->getContainer()->get(DeepRoleChecker::class); | |
$this->assertFalse($roleChecker->rolesContain(['ROLE_TO_EXTEND'], 'ROLE_CAN_EDIT_SOME_RESOURCE')); | |
$this->assertFalse($roleChecker->rolesContain(['ROLE_TO_EXTEND'], 'ROLE_CAN_DELETE_SOME_RESOURCE')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment