public function ViewExecutableTest::providerAttachDisplays in Drupal 9
Provider for testAttachDisplays().
Return value
array[] An array of arrays containing the display state, a user's access to the display and whether it is expected or not that the display gets attached.
File
- core/
modules/ views/ tests/ src/ Unit/ ViewExecutableTest.php, line 520
Class
- ViewExecutableTest
- @coversDefaultClass \Drupal\views\ViewExecutable @group views
Namespace
Drupal\Tests\views\UnitCode
public function providerAttachDisplays() {
return [
'enabled-granted' => [
static::DISPLAY_ENABLED,
static::ACCESS_GRANTED,
TRUE,
],
'enabled-revoked' => [
static::DISPLAY_ENABLED,
static::ACCESS_REVOKED,
FALSE,
],
'disabled-granted' => [
static::DISPLAY_DISABLED,
static::ACCESS_GRANTED,
FALSE,
],
'disabled-revoked' => [
static::DISPLAY_DISABLED,
static::ACCESS_REVOKED,
FALSE,
],
];
}