foreach (self::PLUGINS_TO_LOAD
as $pluginToLoad) { require_once $this->testPluginBaseDir . '/src/' .
$pluginToLoad . '.php';
} $pluginCollection =
$this->
createMock(KernelPluginCollection::
class);
$pluginCollection ->
method('getActives'
) ->
willReturnCallback(fn () =>
array_filter($this->plugins,
static fn (Plugin
$plugin) =>
$plugin->
isActive()));
$this->pluginAclSubscriber =
new PluginAclPrivilegesSubscriber($pluginCollection);
} public function testAclPluginDeactivated(): void
{ $this->
deactivatePlugin(self::PLUGIN_ACL_PRODUCT_VIEWER
);
$aclRoles =
[$this->
getAclRoleMock('pluginAclTestProductViewer',
['product.viewer', 'product:read'
])];
$event =
new EntityLoadedEvent( $this->
createMock(AclRoleDefinition::
class),
$aclRoles,