Skip to content

Commit 4217dc4

Browse files
committed
[ticket/17391] Add simple functional test
PHPBB-17391
1 parent 46ea7a8 commit 4217dc4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/functional/acp_groups_test.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,20 @@ public function test_acp_groups_teampage($group_id, $tick_legend, $tick_teampage
123123
$this->assertEquals((bool) $tick_teampage, (bool) ($this->form_data['group_teampage'] ?? false));
124124
}
125125
}
126+
127+
public function test_acp_groups_create_existing_name()
128+
{
129+
$this->group_manage_login();
130+
131+
$crawler = self::request('GET', 'adm/index.php?i=groups&mode=manage&sid=' . $this->sid);
132+
$form = $crawler->selectButton($this->lang('SUBMIT'))->form([
133+
'group_name' => 'Guests', // 'Guests' is the group name already in use for predefined Guests group
134+
]);
135+
136+
$crawler = self::submit($form);
137+
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
138+
$crawler = self::submit($form); // Just submit the form with selected group name
139+
140+
$this->assertStringContainsString($this->lang('GROUP_NAME_TAKEN'), $crawler->text());
141+
}
126142
}

0 commit comments

Comments
 (0)