public function GroupCreatorWizardTest::testCreatorMembershipNoWizard in Group 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/GroupCreatorWizardTest.php \Drupal\Tests\group\Functional\GroupCreatorWizardTest::testCreatorMembershipNoWizard()
Tests that a group creator gets a membership without using the wizard.
File
- tests/
src/ Functional/ GroupCreatorWizardTest.php, line 34
Class
- GroupCreatorWizardTest
- Tests the group creator wizard.
Namespace
Drupal\Tests\group\FunctionalCode
public function testCreatorMembershipNoWizard() {
/* @var \Drupal\group\Entity\GroupTypeInterface $group_type */
$group_type = $this->entityTypeManager
->getStorage('group_type')
->load('default');
$group_type
->set('creator_wizard', FALSE);
$group_type
->save();
$this
->drupalGet('/group/add/default');
$this
->assertSession()
->statusCodeEquals(200);
$submit_button = 'Create Default label and become a member';
$this
->assertSession()
->buttonExists($submit_button);
$this
->assertSession()
->buttonNotExists('Cancel');
}