public function ActionListTest::testEmptyActionList in Drupal 8
Same name and namespace in other branches
- 9 core/modules/action/tests/src/Functional/ActionListTest.php \Drupal\Tests\action\Functional\ActionListTest::testEmptyActionList()
Tests the behavior when there are no actions to list in the admin page.
File
- core/
modules/ action/ tests/ src/ Functional/ ActionListTest.php, line 29
Class
- ActionListTest
- Test behaviors when visiting the action listing page.
Namespace
Drupal\Tests\action\FunctionalCode
public function testEmptyActionList() {
// Create a user with permission to view the actions administration pages.
$this
->drupalLogin($this
->drupalCreateUser([
'administer actions',
]));
// Ensure the empty text appears on the action list page.
/** @var $storage \Drupal\Core\Entity\EntityStorageInterface */
$storage = $this->container
->get('entity_type.manager')
->getStorage('action');
$actions = $storage
->loadMultiple();
$storage
->delete($actions);
$this
->drupalGet('/admin/config/system/actions');
$this
->assertRaw('There are no actions yet.');
}