3 namespace Drupal\Tests\action\Functional;
5 use Drupal\Tests\BrowserTestBase;
8 * Test behaviors when visiting the action listing page.
12 class ActionListTest extends BrowserTestBase {
19 public static $modules = ['action'];
22 * Tests the behavior when there are no actions to list in the admin page.
24 public function testEmptyActionList() {
25 // Create a user with permission to view the actions administration pages.
26 $this->drupalLogin($this->drupalCreateUser(['administer actions']));
28 // Ensure the empty text appears on the action list page.
29 /** @var $storage \Drupal\Core\Entity\EntityStorageInterface */
30 $storage = $this->container->get('entity.manager')->getStorage('action');
31 $actions = $storage->loadMultiple();
32 $storage->delete($actions);
33 $this->drupalGet('/admin/config/system/actions');
34 $this->assertRaw('There are no actions yet.');