function DevelSwitchUserTest::assertSwitchUserListCount
Same name in other branches
- 4.x tests/src/Functional/DevelSwitchUserTest.php \Drupal\Tests\devel\Functional\DevelSwitchUserTest::assertSwitchUserListCount()
Helper function for verify the number of items shown in the user list.
Parameters
int $number: The expected number of items.
2 calls to DevelSwitchUserTest::assertSwitchUserListCount()
- DevelSwitchUserTest::testSwitchUserBlockConfiguration in tests/
src/ Functional/ DevelSwitchUserTest.php - Tests the switch user block configuration.
- DevelSwitchUserTest::testSwitchUserListItems in tests/
src/ Functional/ DevelSwitchUserTest.php - Test the user list items.
File
-
tests/
src/ Functional/ DevelSwitchUserTest.php, line 228
Class
- DevelSwitchUserTest
- Tests switch user.
Namespace
Drupal\Tests\devel\FunctionalCode
public function assertSwitchUserListCount($number) : void {
$result = $this->xpath('//div[@id=:block]//ul/li/a', [
':block' => 'block-switch-user',
]);
$this->assertCount($number, $result);
}