class ViewsViewFieldStatusTest

Same name and namespace in other branches
  1. 11.x core/themes/default_admin/tests/src/Kernel/ViewsViewFieldStatusTest.php \Drupal\Tests\default_admin\Kernel\ViewsViewFieldStatusTest

Tests the publication status marker of views status fields.

The theme suggestion views_view_field__status is derived from the ID of the views field, so views-view-field--status.html.twig is used for the status field of every entity type, and also for fields that hold something else than a publication state.

Attributes

#[Group('default_admin')] #[RunTestsInSeparateProcesses]

Hierarchy

Expanded class hierarchy of ViewsViewFieldStatusTest

See also

\Drupal\default_admin\Hook\PreprocessHooks::preprocessViewsViewFieldStatus()

\Drupal\views\Plugin\views\field\FieldPluginBase::themeFunctions()

File

core/themes/default_admin/tests/src/Kernel/ViewsViewFieldStatusTest.php, line 36

Namespace

Drupal\Tests\default_admin\Kernel
View source
class ViewsViewFieldStatusTest extends ViewsKernelTestBase {
  use TaxonomyTestTrait;
  use UserCreationTrait;
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'field',
    'language',
    'node',
    'taxonomy',
    'text',
  ];
  
  /**
   * The vocabulary of the test terms.
   */
  protected VocabularyInterface $vocabulary;
  
  /**
   * {@inheritdoc}
   */
  protected function setUp($import_test_views = TRUE) : void {
    parent::setUp(FALSE);
    $this->installEntitySchema('user');
    $this->installEntitySchema('node');
    $this->installEntitySchema('taxonomy_term');
    $this->installSchema('node', [
      'node_access',
    ]);
    $this->installConfig([
      'filter',
      'language',
      'node',
    ]);
    // The translation language renderer only adds the language code of the row
    // to the query when the site is multilingual.
    // @see \Drupal\views\Entity\Render\TranslationLanguageRenderer::query()
    ConfigurableLanguage::createFromLangcode('es')->save();
    NodeType::create([
      'type' => 'page',
      'name' => 'Page',
    ])->save();
    $this->vocabulary = $this->createVocabulary();
    // Unpublished rows are only returned when node access is bypassed.
    $this->setUpCurrentUser([], [
      'access content',
      'administer taxonomy',
      'bypass node access',
    ]);
    // Install and activate the theme, so that its template and its preprocess
    // implementation are used while rendering. Installing the theme rebuilds
    // the container, which is what registers the
    // #[Hook('preprocess_views_view_field__status')] implementation of the
    // theme.
    // @see \Drupal\Core\Hook\ThemeHookCollectorPass
    \Drupal::service('theme_installer')->install([
      'default_admin',
    ]);
    $this->container = \Drupal::getContainer();
    \Drupal::theme()->setActiveTheme(\Drupal::service(ThemeInitializationInterface::class)->initTheme('default_admin'));
  }
  
  /**
   * Tests the marker of published and unpublished nodes.
   */
  public function testNodePublicationState() : void {
    Node::create([
      'type' => 'page',
      'title' => 'Published node',
      'status' => TRUE,
    ])->save();
    Node::create([
      'type' => 'page',
      'title' => 'Unpublished node',
      'status' => FALSE,
    ])->save();
    $this->createStatusView('test_node_status', 'node', 'status');
    $view = Views::getView('test_node_status');
    $this->executeView($view);
    $this->assertCount(2, $view->result);
    $this->assertSame([
      'marker' => 'draft',
      'marker marker--published' => 'live',
    ], $this->renderStatusFieldByMarker($view));
  }
  
  /**
   * Tests that the marker of a node row follows the row translation.
   */
  public function testNodeTranslationPublicationState() : void {
    $node = Node::create([
      'type' => 'page',
      'title' => 'Published in English',
      'status' => TRUE,
    ]);
    $node->addTranslation('es', [
      'title' => 'Unpublished Spanish translation',
      'status' => FALSE,
    ]);
    $node->save();
    $this->createStatusView('test_node_translation_status', 'node', 'status', '***LANGUAGE_entity_translation***');
    $view = Views::getView('test_node_translation_status');
    $this->executeView($view);
    // The data table holds one row per translation.
    $this->assertCount(2, $view->result);
    $this->assertSame([
      'marker' => 'draft',
      'marker marker--published' => 'live',
    ], $this->renderStatusFieldByMarker($view));
  }
  
  /**
   * Tests the marker of a publishable entity type other than the node type.
   */
  public function testTermPublicationState() : void {
    Term::create([
      'vid' => $this->vocabulary
        ->id(),
      'name' => 'Published term',
      'status' => TRUE,
    ])
      ->save();
    Term::create([
      'vid' => $this->vocabulary
        ->id(),
      'name' => 'Unpublished term',
      'status' => FALSE,
    ])
      ->save();
    $this->createStatusView('test_term_status', 'taxonomy_term', 'status');
    $view = Views::getView('test_term_status');
    $this->executeView($view);
    $this->assertCount(2, $view->result);
    $this->assertSame([
      'marker' => 'draft',
      'marker marker--published' => 'live',
    ], $this->renderStatusFieldByMarker($view));
  }
  
  /**
   * Tests that the marker of a term row follows the row translation.
   *
   * This covers the regression the template logic was moved into a preprocess
   * implementation for. The template used to read the row translation from the
   * row property node_field_data_langcode, which is the language code alias of
   * a node based view. On a taxonomy term view that property does not exist, so
   * the default translation was used and this row got the marker of a published
   * term while its output said the term was unpublished.
   */
  public function testTermTranslationPublicationState() : void {
    $term = Term::create([
      'vid' => $this->vocabulary
        ->id(),
      'name' => 'Published in English',
      'status' => TRUE,
    ]);
    $term->addTranslation('es', [
      'name' => 'Unpublished Spanish translation',
      'status' => FALSE,
    ]);
    $term->save();
    $this->createStatusView('test_term_translation_status', 'taxonomy_term', 'status', '***LANGUAGE_entity_translation***');
    $view = Views::getView('test_term_translation_status');
    $this->executeView($view);
    $this->assertCount(2, $view->result);
    $this->assertSame([
      'marker' => 'draft',
      'marker marker--published' => 'live',
    ], $this->renderStatusFieldByMarker($view));
  }
  
  /**
   * Tests that a field of a handler without an entity has no marker.
   */
  public function testFieldWithoutEntity() : void {
    // The 'status' column of the views test table is handled by the 'boolean'
    // field plugin, which is not an entity field handler and has no entity to
    // read a publication state from.
    $storage = View::create([
      'id' => 'test_status_without_entity',
      'label' => 'test_status_without_entity',
      'module' => 'views',
      'base_table' => 'views_test_data',
      'base_field' => 'id',
    ]);
    $executable = $storage->getExecutable();
    $executable->newDisplay('default', 'Default', 'default');
    $display = $executable->displayHandlers
      ->get('default');
    $display->setOption('pager', [
      'type' => 'none',
      'options' => [
        'offset' => 0,
      ],
    ]);
    $display->setOption('fields', [
      'status' => [
        'id' => 'status',
        'table' => 'views_test_data',
        'field' => 'status',
        'plugin_id' => 'boolean',
        'type' => 'custom',
        'type_custom_true' => 'live',
        'type_custom_false' => 'draft',
      ],
    ]);
    $storage->save();
    $view = Views::getView('test_status_without_entity');
    $this->executeView($view);
    $this->assertCount(5, $view->result);
    foreach ($view->result as $row) {
      $output = $this->renderStatusField($view, $row);
      $this->assertStringNotContainsString('marker', $output);
      $this->assertContains($output, [
        'live',
        'draft',
      ]);
    }
  }
  
  /**
   * Tests that the preprocess implementation owns the is_published variable.
   */
  public function testExistingPublishedVariableIsOverwritten() : void {
    $variables = [
      'field' => $this->createStub(FieldPluginBase::class),
      'row' => new ResultRow(),
      'is_published' => TRUE,
    ];
    \Drupal::classResolver(PreprocessHooks::class)->preprocessViewsViewFieldStatus($variables);
    $this->assertArrayHasKey('is_published', $variables);
    $this->assertNull($variables['is_published']);
  }
  
  /**
   * Tests that the entity is resolved from the configured relationship.
   */
  public function testRelationshipEntityPublicationState() : void {
    $node = Node::create([
      'type' => 'page',
      'title' => 'Published relationship entity',
      'status' => TRUE,
    ]);
    $node->save();
    $this->createStatusView('test_relationship_status', 'node', 'status');
    $view = Views::getView('test_relationship_status');
    $this->executeView($view);
    $this->assertCount(1, $view->result);
    $field = $view->field['status'];
    $field->options['relationship'] = 'test_relationship';
    $row = $view->result[0];
    $row->_entity = NULL;
    $row->_relationship_entities['test_relationship'] = $node;
    $variables = [
      'field' => $field,
      'row' => $row,
    ];
    \Drupal::classResolver(PreprocessHooks::class)->preprocessViewsViewFieldStatus($variables);
    $this->assertTrue($variables['is_published']);
  }
  
  /**
   * Creates a view of an entity type with a single field with the ID 'status'.
   *
   * @param string $id
   *   The ID of the view.
   * @param string $entity_type_id
   *   The ID of the entity type the view is based on.
   * @param string $field_name
   *   The name of the entity field to render.
   * @param string|null $rendering_language
   *   (optional) The rendering language of the display.
   */
  protected function createStatusView(string $id, string $entity_type_id, string $field_name, ?string $rendering_language = NULL) : void {
    $entity_type = \Drupal::entityTypeManager()->getDefinition($entity_type_id);
    $base_table = $entity_type->getDataTable();
    $storage = View::create([
      'id' => $id,
      'label' => $id,
      'module' => 'views',
      'base_table' => $base_table,
      'base_field' => $entity_type->getKey('id'),
    ]);
    $executable = $storage->getExecutable();
    $executable->newDisplay('default', 'Default', 'default');
    $display = $executable->displayHandlers
      ->get('default');
    $display->setOption('pager', [
      'type' => 'none',
      'options' => [
        'offset' => 0,
      ],
    ]);
    // The array key and the 'id' are the views field ID. The theme suggestion
    // is derived from that ID, not from the name of the rendered field.
    $display->setOption('fields', [
      'status' => [
        'id' => 'status',
        'table' => $base_table,
        'field' => $field_name,
        'entity_type' => $entity_type_id,
        'entity_field' => $field_name,
        'plugin_id' => 'field',
        'type' => 'boolean',
        'settings' => [
          'format' => 'custom',
          'format_custom_true' => 'live',
          'format_custom_false' => 'draft',
        ],
      ],
    ]);
    if ($rendering_language !== NULL) {
      $display->setOption('rendering_language', $rendering_language);
    }
    $storage->save();
  }
  
  /**
   * Renders the status field of every row of a view, keyed by marker class.
   *
   * @param \Drupal\views\ViewExecutable $view
   *   An executed view with a field with the ID 'status'.
   *
   * @return array
   *   The text inside the marker, keyed by the class attribute of the marker
   *   element. Output that is not wrapped in a marker is keyed by an empty
   *   string. Sorted by key, because the order of the rows of a view is not
   *   relevant for this test.
   */
  protected function renderStatusFieldByMarker(ViewExecutable $view) : array {
    $rendered = [];
    foreach ($view->result as $row) {
      $output = $this->renderStatusField($view, $row);
      if (preg_match('#^<span class="(marker[^"]*)">(.*)</span>$#s', $output, $matches) === 1) {
        $rendered[$matches[1]] = $matches[2];
      }
      else {
        $rendered[''] = $output;
      }
    }
    ksort($rendered);
    return $rendered;
  }
  
  /**
   * Renders the status field of a single row through the theme system.
   *
   * @param \Drupal\views\ViewExecutable $view
   *   An executed view with a field with the ID 'status'.
   * @param \Drupal\views\ResultRow $row
   *   The row to render the field of.
   *
   * @return string
   *   The rendered field output, without surrounding whitespace.
   */
  protected function renderStatusField(ViewExecutable $view, ResultRow $row) : string {
    $field = $view->field['status'];
    $build = [
      '#theme' => $field->themeFunctions(),
      '#view' => $view,
      '#field' => $field,
      '#row' => $row,
    ];
    return trim((string) \Drupal::service('renderer')->renderInIsolation($build));
  }

}

Members

Title Sort descending Deprecated Modifiers Object type Summary Overriden Title Overrides
AssertContentTrait::$content protected property The current raw content.
AssertContentTrait::$drupalSettings protected property The drupalSettings value from the current raw $content.
AssertContentTrait::$elements protected property The XML structure parsed from the current raw $content.
AssertContentTrait::$plainTextContent protected property The plain-text content of raw $content (text nodes).
AssertContentTrait::assertEscaped protected function Passes if the raw text IS found escaped on the loaded page, fail otherwise.
AssertContentTrait::assertField protected function Asserts that a field exists with the given name or ID.
AssertContentTrait::assertFieldByName protected function Asserts that a field exists with the given name and value.
AssertContentTrait::assertFieldByXPath protected function Asserts that a field exists in the current page by the given XPath.
AssertContentTrait::assertFieldsByValue protected function Asserts that a field exists in the current page with a given Xpath result.
AssertContentTrait::assertLink protected function Passes if a link with the specified label is found.
AssertContentTrait::assertLinkByHref protected function Passes if a link containing a given href (part) is found.
AssertContentTrait::assertNoLink protected function Passes if a link with the specified label is not found.
AssertContentTrait::assertNoPattern protected function Triggers a pass if the perl regex pattern is not found in raw content.
AssertContentTrait::assertNoRaw protected function Passes if the raw text is NOT found on the loaded page, fail otherwise.
AssertContentTrait::assertNoText protected function Passes if the page (with HTML stripped) does not contains the text.
AssertContentTrait::assertPattern protected function Triggers a pass if the Perl regex pattern is found in the raw content.
AssertContentTrait::assertRaw protected function Passes if the raw text IS found on the loaded page, fail otherwise.
AssertContentTrait::assertText protected function Passes if the page (with HTML stripped) contains the text.
AssertContentTrait::assertTextHelper protected function Helper for assertText and assertNoText.
AssertContentTrait::assertThemeOutput protected function Asserts themed output.
AssertContentTrait::assertTitle protected function Pass if the page title is the given string.
AssertContentTrait::buildXPathQuery protected function Builds an XPath query.
AssertContentTrait::constructFieldXpath protected function Helper: Constructs an XPath for the given set of attributes and value.
AssertContentTrait::cssSelect protected function Searches elements using a CSS selector in the raw content.
AssertContentTrait::getAllOptions protected function Get all option elements, including nested options, in a select.
AssertContentTrait::getDrupalSettings protected function Gets the value of drupalSettings for the currently-loaded page.
AssertContentTrait::getRawContent protected function Gets the current raw content.
AssertContentTrait::getSelectedItem protected function Get the selected value from a select field.
AssertContentTrait::getSimpleXmlElementsByXpath protected function Performs an xpath search on the contents of the internal browser.
AssertContentTrait::getTextContent protected function Retrieves the plain-text content from the current raw content.
AssertContentTrait::parse protected function Parse content returned from curlExec using DOM and SimpleXML.
AssertContentTrait::removeWhiteSpace protected function Removes all white-space between HTML tags from the raw content.
AssertContentTrait::setDrupalSettings protected function Sets the value of drupalSettings for the currently-loaded page.
AssertContentTrait::setRawContent protected function Sets the raw content (e.g. HTML).
AssertContentTrait::xpath Deprecated protected function Performs an xpath search on the contents of the internal browser.
BrowserHtmlDebugTrait::$htmlOutputBaseUrl protected property The Base URI to use for links to the output files.
BrowserHtmlDebugTrait::$htmlOutputClassName protected property Class name for HTML output logging.
BrowserHtmlDebugTrait::$htmlOutputCounter protected property Counter for HTML output logging.
BrowserHtmlDebugTrait::$htmlOutputCounterStorage protected property Counter storage for HTML output logging.
BrowserHtmlDebugTrait::$htmlOutputDirectory protected property Directory name for HTML output logging.
BrowserHtmlDebugTrait::$htmlOutputEnabled protected property HTML output enabled.
BrowserHtmlDebugTrait::$htmlOutputTestId protected property HTML output test ID.
BrowserHtmlDebugTrait::formatHtmlOutputHeaders protected function Formats HTTP headers as string for HTML output logging.
BrowserHtmlDebugTrait::getHtmlOutputHeaders protected function Returns headers in HTML output format. 1
BrowserHtmlDebugTrait::getResponseLogHandler protected function Provides a Guzzle middleware handler to log every response received.
BrowserHtmlDebugTrait::getTestMethodCaller protected function Retrieves the current calling line in the class under test. 1
BrowserHtmlDebugTrait::htmlOutput protected function Logs a HTML output message in a text file.
BrowserHtmlDebugTrait::initBrowserOutputFile protected function Creates the directory to store browser output.
ConfigTestTrait::configImporter protected function Returns a ConfigImporter object to import test configuration.
ConfigTestTrait::copyConfig protected function Copies configuration objects from source storage to target storage.
DrupalTestCase::$root protected property The Drupal root directory.
DrupalTestCase::getDrupalRoot Deprecated protected function Returns the Drupal root directory. 1
DrupalTestCase::setUpRoot final protected function Ensure that the $root property is set initially.
DrupalTestCase::skipTestWithAttribute final protected function Supports skipping tests with the Skip attribute.
DrupalTestCaseTrait::checkErrorHandlerOnTearDown public function Checks the test error handler after test execution. 1
DrupalTestCaseTrait::checkLegacySymfonyDeprecationHelperEnvVariable public function Checks legacy SYMFONY_DEPRECATIONS_HELPER env variable is not used.
DrupalTestCaseTrait::expectExceptionMessageIs protected function Expects an exactly matching exception message.
DrupalTestCaseTrait::expectExceptionMessageIsOrContains protected function Expects an exception message containing a specified string.
DrupalTestCaseTrait::setDebugDumpHandler public static function Registers the dumper CLI handler when the DebugDump extension is enabled.
ExtensionListTestTrait::getModulePath protected function Gets the path for the specified module.
ExtensionListTestTrait::getThemePath protected function Gets the path for the specified theme.
HttpKernelUiHelperTrait::$mink protected property Mink session manager.
HttpKernelUiHelperTrait::assertSession public function Returns WebAssert object.
HttpKernelUiHelperTrait::buildUrl protected function Builds a URL from a system path or a URL object.
HttpKernelUiHelperTrait::clickLink protected function Follows a link by complete name.
HttpKernelUiHelperTrait::drupalGet protected function Retrieves a Drupal path.
HttpKernelUiHelperTrait::getDefaultDriverInstance protected function Gets an instance of the default Mink driver.
HttpKernelUiHelperTrait::getNodeElementsByXpath protected function Performs an xpath search on the contents of the internal browser.
HttpKernelUiHelperTrait::getSession public function Returns Mink session.
HttpKernelUiHelperTrait::getUrl protected function Gets the current URL from the browser.
HttpKernelUiHelperTrait::initMink protected function Initializes Mink sessions.
HttpKernelUiHelperTrait::rebuildContainer protected function Rebuilds the container.
KernelTestBase::$classLoader protected property The class loader.
KernelTestBase::$configImporter protected property The configuration importer.
KernelTestBase::$configSchemaCheckerExclusions protected static property An array of config object names that are excluded from schema checking. 4
KernelTestBase::$container protected property The test container.
KernelTestBase::$databasePrefix protected property The test database prefix.
KernelTestBase::$keyValue protected property The key_value service that must persist between container rebuilds.
KernelTestBase::$siteDirectory protected property The relative path to the test site directory.
KernelTestBase::$strictConfigSchema protected property Set to TRUE to strict check all configuration saved. 9
KernelTestBase::$usesSuperUserAccessPolicy protected property Set to TRUE to make user 1 a super user. 1
KernelTestBase::$vfsRoot protected property The virtual filesystem root directory.
KernelTestBase::assertPostConditions protected function 1
KernelTestBase::bootEnvironment protected function Bootstraps a basic test environment.
KernelTestBase::bootKernel protected function Bootstraps a kernel for a test. 1
KernelTestBase::config protected function Configuration accessor for tests. Returns non-overridden configuration.
KernelTestBase::disableModules protected function Disables modules for this test.
KernelTestBase::enableModules protected function Enables modules for this test. 2
KernelTestBase::getConfigSchemaExclusions protected function Gets the config schema exclusions for this test.
KernelTestBase::getDatabaseConnectionInfo protected function Returns the Database connection info to be used for this test. 3
KernelTestBase::getDatabasePrefix public function Gets the database prefix used for test isolation.
KernelTestBase::getExtensionsForModules private function Returns Extension objects for $modules to install.
KernelTestBase::getModulesToEnable protected static function Returns the modules to install for this test.
KernelTestBase::initFileCache protected function Initializes the FileCache component.
KernelTestBase::installConfig protected function Installs default configuration for a given list of modules.
KernelTestBase::installEntitySchema protected function Installs the storage schema for a specific entity type.
KernelTestBase::installSchema protected function Installs database tables from a module schema definition.
KernelTestBase::register public function Registers test-specific services. Overrides ServiceProviderInterface::register 43
KernelTestBase::render protected function Renders a render array. 1
KernelTestBase::setInstallProfile protected function Sets the install profile and rebuilds the container to update it.
KernelTestBase::setSetting protected function Sets an in-memory Settings variable.
KernelTestBase::setUpFilesystem protected function Sets up the filesystem, so things like the file directory. 3
KernelTestBase::tearDown protected function 11
KernelTestBase::tearDownCloseDatabaseConnection public function Additional tear down method to close the connection at the end.
KernelTestBase::vfsDump protected function Dumps the current state of the virtual filesystem to STDOUT.
KernelTestBase::__sleep public function Prevents serializing any properties.
RandomGeneratorTrait::getRandomGenerator protected function Gets the random generator for the utility methods.
RandomGeneratorTrait::randomMachineName protected function Generates a unique random string containing letters and numbers.
RandomGeneratorTrait::randomObject public function Generates a random PHP object.
RandomGeneratorTrait::randomString public function Generates a pseudo-random string of ASCII characters of codes 32 to 126.
StorageCopyTrait::replaceStorageContents protected static function Copy the configuration from one storage to another and remove stale items.
TaxonomyTestTrait::createTaxonomyTermRevision protected function Creates a new revision for a given taxonomy term.
TaxonomyTestTrait::createTerm protected function Returns a new term with random properties given a vocabulary.
TaxonomyTestTrait::createVocabulary protected function Returns a new vocabulary with random properties.
UserCreationTrait::checkPermissions protected function Checks whether a given list of permission names is valid.
UserCreationTrait::createAdminRole protected function Creates an administrative role.
UserCreationTrait::createRole protected function Creates a role with specified permissions.
UserCreationTrait::createUser protected function Create a user with a given set of permissions. 1
UserCreationTrait::grantPermissions protected function Grant permissions to a user role.
UserCreationTrait::setCurrentUser protected function Switch the current logged in user.
UserCreationTrait::setUpCurrentUser protected function Creates a random user account and sets it as current user.
ViewResultAssertionTrait::assertIdenticalResultset protected function Verifies that a result set returned by a View matches expected values.
ViewResultAssertionTrait::assertIdenticalResultsetHelper protected function Performs View result assertions.
ViewResultAssertionTrait::assertNotIdenticalResultset protected function Verifies that a result set returned by a View differs from certain values.
ViewsKernelTestBase::$testViews public static property Views to be enabled. 158
ViewsKernelTestBase::dataSet protected function Returns a very simple test dataset. 10
ViewsKernelTestBase::executeView protected function Executes a view.
ViewsKernelTestBase::orderResultSet protected function Orders a nested array containing a result set based on a given column.
ViewsKernelTestBase::schemaDefinition protected function Returns the schema definition. 8
ViewsKernelTestBase::setUpFixtures protected function Sets up the configuration and schema of views and views_test_data modules. 7
ViewsKernelTestBase::viewsData protected function Returns the views data definition. 24
ViewsViewFieldStatusTest::$modules protected static property Modules to install. Overrides ViewsKernelTestBase::$modules
ViewsViewFieldStatusTest::$vocabulary protected property The vocabulary of the test terms.
ViewsViewFieldStatusTest::createStatusView protected function Creates a view of an entity type with a single field with the ID &#039;status&#039;.
ViewsViewFieldStatusTest::renderStatusField protected function Renders the status field of a single row through the theme system.
ViewsViewFieldStatusTest::renderStatusFieldByMarker protected function Renders the status field of every row of a view, keyed by marker class.
ViewsViewFieldStatusTest::setUp protected function Overrides ViewsKernelTestBase::setUp
ViewsViewFieldStatusTest::testExistingPublishedVariableIsOverwritten public function Tests that the preprocess implementation owns the is_published variable.
ViewsViewFieldStatusTest::testFieldWithoutEntity public function Tests that a field of a handler without an entity has no marker.
ViewsViewFieldStatusTest::testNodePublicationState public function Tests the marker of published and unpublished nodes.
ViewsViewFieldStatusTest::testNodeTranslationPublicationState public function Tests that the marker of a node row follows the row translation.
ViewsViewFieldStatusTest::testRelationshipEntityPublicationState public function Tests that the entity is resolved from the configured relationship.
ViewsViewFieldStatusTest::testTermPublicationState public function Tests the marker of a publishable entity type other than the node type.
ViewsViewFieldStatusTest::testTermTranslationPublicationState public function Tests that the marker of a term row follows the row translation.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.