public function EntityCreateAccessCheckTest::providerTestAccess in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Entity/EntityCreateAccessCheckTest.php \Drupal\Tests\Core\Entity\EntityCreateAccessCheckTest::providerTestAccess()
Provides test data for testAccess.
Return value
array
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityCreateAccessCheckTest.php, line 51 - Contains \Drupal\Tests\Core\Entity\EntityCreateAccessCheckTest.
Class
- EntityCreateAccessCheckTest
- @coversDefaultClass \Drupal\Core\Entity\EntityCreateAccessCheck
Namespace
Drupal\Tests\Core\EntityCode
public function providerTestAccess() {
$no_access = FALSE;
$access = TRUE;
return array(
array(
'',
'entity_test',
$no_access,
$no_access,
),
array(
'',
'entity_test',
$access,
$access,
),
array(
'test_entity',
'entity_test:test_entity',
$access,
$access,
),
array(
'test_entity',
'entity_test:test_entity',
$no_access,
$no_access,
),
array(
'test_entity',
'entity_test:{bundle_argument}',
$access,
$access,
),
array(
'test_entity',
'entity_test:{bundle_argument}',
$no_access,
$no_access,
),
array(
'',
'entity_test:{bundle_argument}',
$no_access,
$no_access,
FALSE,
),
// When the bundle is not provided, access should be denied even if the
// access control handler would allow access.
array(
'',
'entity_test:{bundle_argument}',
$access,
$no_access,
FALSE,
),
);
}