public function DevelGenerateBrowserTest::testDevelGenerateUsers in Devel 8.3
Same name and namespace in other branches
- 4.x devel_generate/tests/src/Functional/DevelGenerateBrowserTest.php \Drupal\Tests\devel_generate\Functional\DevelGenerateBrowserTest::testDevelGenerateUsers()
Tests generating users.
File
- devel_generate/
tests/ src/ Functional/ DevelGenerateBrowserTest.php, line 21
Class
- DevelGenerateBrowserTest
- Tests the logic to generate data.
Namespace
Drupal\Tests\devel_generate\FunctionalCode
public function testDevelGenerateUsers() {
$edit = [
'num' => 4,
];
$this
->drupalPostForm('admin/config/development/generate/user', $edit, 'Generate');
$this
->assertText('4 users created.');
$this
->assertText('Generate process complete.');
// Tests that if no content types are selected an error message is shown.
$edit = [
'num' => 4,
'title_length' => 4,
];
$this
->drupalPostForm('admin/config/development/generate/content', $edit, 'Generate');
$this
->assertText('Please select at least one content type');
}