function ViewExecutableTest::providerAttachDisplays
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 532  
Class
- ViewExecutableTest
 - @coversDefaultClass \Drupal\views\ViewExecutable[[api-linebreak]] @group views
 
Namespace
Drupal\Tests\views\UnitCode
public static 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,
    ],
  ];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.