onAclRoleLoaded example


        $this->deactivatePlugin(self::PLUGIN_ACL_PRODUCT_VIEWER);

        $aclRoles = [$this->getAclRoleMock('pluginAclTestProductViewer', ['product.viewer', 'product:read'])];

        $event = new EntityLoadedEvent(
            $this->createMock(AclRoleDefinition::class),
            $aclRoles,
            Context::createDefaultContext()
        );

        $this->pluginAclSubscriber->onAclRoleLoaded($event);

        /** @var AclRoleEntity $enrichedAclRole */
        $enrichedAclRole = $event->getEntities()[0];

        static::assertSame(['product.viewer', 'product:read']$enrichedAclRole->getPrivileges());
    }

    public function testAclPluginActivated(): void
    {
        $this->activatePlugin(self::PLUGIN_ACL_PRODUCT_VIEWER);

        
Home | Imprint | This part of the site doesn't use cookies.