function ActionExampleTest::testActionExample

Same name in other branches
  1. 3.x modules/action_example/tests/src/Functional/ActionExampleTest.php \Drupal\Tests\theming_example\Functional\ActionExampleTest::testActionExample()

Test Action Example.

1. action_example_basic_action: Configure a action_example_basic_action to happen when user logs in. 2. action_example_unblock_user_action: When a user's profile is being viewed, unblock that user. 3. action_example_node_sticky_action: Create a user, configure that user to always be stickied using advanced configuration. Have the user create content; verify that it gets stickied.

File

modules/action_example/tests/src/Functional/ActionExampleTest.php, line 46

Class

ActionExampleTest
Default test case for the action_example module.

Namespace

Drupal\Tests\theming_example\Functional

Code

public function testActionExample() {
    // Create an administrative user.
    $admin_user = $this->drupalCreateUser([
        'administer actions',
    ]);
    $this->drupalLogin($admin_user);
    $this->drupalGet('/admin/config/system/actions');
    $this->assertSession()
        ->pageTextContains('An action that does nothing');
}