ActionListTest.php
Same filename in other branches
Namespace
Drupal\Tests\action\FunctionalFile
-
core/
modules/ action/ tests/ src/ Functional/ ActionListTest.php
View source
<?php
namespace Drupal\Tests\action\Functional;
use Drupal\Tests\BrowserTestBase;
/**
* Test behaviors when visiting the action listing page.
*
* @group action
*/
class ActionListTest extends BrowserTestBase {
/**
* Modules to install.
*
* @var array
*/
public static $modules = [
'action',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests the behavior when there are no actions to list in the admin page.
*/
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.');
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
ActionListTest | Test behaviors when visiting the action listing page. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.