function RefinableCalculatedPermissionsTest::testRemoveItems
Same name in other branches
- 10 core/tests/Drupal/Tests/Core/Session/RefinableCalculatedPermissionsTest.php \Drupal\Tests\Core\Session\RefinableCalculatedPermissionsTest::testRemoveItems()
Tests the removal of all calculated permissions items.
@depends testAddItem
File
-
core/
tests/ Drupal/ Tests/ Core/ Session/ RefinableCalculatedPermissionsTest.php, line 81
Class
- RefinableCalculatedPermissionsTest
- Tests the RefinableCalculatedPermissions class.
Namespace
Drupal\Tests\Core\SessionCode
public function testRemoveItems() : void {
$scope = 'some_scope';
$item = new CalculatedPermissionsItem([
'bar',
], FALSE, $scope, 'foo');
$calculated_permissions = new RefinableCalculatedPermissions();
$calculated_permissions->addItem($item);
$calculated_permissions->removeItems();
$this->assertFalse($calculated_permissions->getItem($scope, 'foo'), 'Could not retrieve a removed item.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.