function WorkspaceTestUtilities::isLabelInContentOverview
Same name in other branches
- 9 core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php \Drupal\Tests\workspaces\Functional\WorkspaceTestUtilities::isLabelInContentOverview()
- 8.9.x core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php \Drupal\Tests\workspaces\Functional\WorkspaceTestUtilities::isLabelInContentOverview()
- 10 core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php \Drupal\Tests\workspaces\Functional\WorkspaceTestUtilities::isLabelInContentOverview()
Determine if the content list has an entity's label.
This assertion can be used to validate a particular entity exists in the current workspace.
File
-
core/
modules/ workspaces/ tests/ src/ Functional/ WorkspaceTestUtilities.php, line 199
Class
- WorkspaceTestUtilities
- Utility methods for use in BrowserTestBase tests.
Namespace
Drupal\Tests\workspaces\FunctionalCode
protected function isLabelInContentOverview($label) {
$this->drupalGet('/admin/content');
$session = $this->getSession();
$this->assertSession()
->statusCodeEquals(200);
$page = $session->getPage();
return $page->hasContent($label);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.