public function GroupCreatorWizardTest::testCreatorMembershipWizard in Group 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/GroupCreatorWizardTest.php \Drupal\Tests\group\Functional\GroupCreatorWizardTest::testCreatorMembershipWizard()
Tests that a group creator gets a membership using the wizard.
File
- tests/
src/ Functional/ GroupCreatorWizardTest.php, line 15
Class
- GroupCreatorWizardTest
- Tests the group creator wizard.
Namespace
Drupal\Tests\group\FunctionalCode
public function testCreatorMembershipWizard() {
$this
->drupalGet('/group/add/default');
$this
->assertSession()
->statusCodeEquals(200);
$submit_button = 'Create Default label and complete your membership';
$this
->assertSession()
->buttonExists($submit_button);
$this
->assertSession()
->buttonExists('Cancel');
$edit = [
'Title' => $this
->randomString(),
];
$this
->submitForm($edit, $submit_button);
$submit_button = 'Save group and membership';
$this
->assertSession()
->buttonExists($submit_button);
$this
->assertSession()
->buttonExists('Back');
}