You are here

public function DevelSwitchUserTest::assertSwitchUserNoSearchForm in Devel 4.x

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/DevelSwitchUserTest.php \Drupal\Tests\devel\Functional\DevelSwitchUserTest::assertSwitchUserNoSearchForm()
  2. 8 tests/src/Functional/DevelSwitchUserTest.php \Drupal\Tests\devel\Functional\DevelSwitchUserTest::assertSwitchUserNoSearchForm()
  3. 8.2 tests/src/Functional/DevelSwitchUserTest.php \Drupal\Tests\devel\Functional\DevelSwitchUserTest::assertSwitchUserNoSearchForm()

Helper function for verify if the search form is not shown.

1 call to DevelSwitchUserTest::assertSwitchUserNoSearchForm()
DevelSwitchUserTest::testSwitchUserBlockConfiguration in tests/src/Functional/DevelSwitchUserTest.php
Tests the switch user block configuration.

File

tests/src/Functional/DevelSwitchUserTest.php, line 252

Class

DevelSwitchUserTest
Tests switch user.

Namespace

Drupal\Tests\devel\Functional

Code

public function assertSwitchUserNoSearchForm() {
  $result = $this
    ->xpath('//div[@id=:block]//form[contains(@class, :form)]', [
    ':block' => 'block-switch-user',
    ':form' => 'devel-switchuser-form',
  ]);
  $this
    ->assertTrue(count($result) == 0, 'The search form is not shown.');
}