function EntityBundleAccessCheckTest::getBundleAndAccessResult
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/EntityBundleAccessCheckTest.php \Drupal\Tests\Core\Entity\EntityBundleAccessCheckTest::getBundleAndAccessResult()
Data provider.
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityBundleAccessCheckTest.php, line 39
Class
- EntityBundleAccessCheckTest
- Unit test of entity access checking system.
Namespace
Drupal\Tests\Core\EntityCode
public function getBundleAndAccessResult() {
return [
[
'article',
'node:article',
AccessResult::allowed(),
],
[
'page',
'node:article',
AccessResult::neutral('The entity bundle does not match the route _entity_bundles requirement.'),
],
[
'page',
'node:article|page',
AccessResult::allowed(),
],
[
'article',
'node:article|page',
AccessResult::allowed(),
],
[
'book_page',
'node:article|page',
AccessResult::neutral('The entity bundle does not match the route _entity_bundles requirement.'),
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.