public function OgUiManagePeopleTestCase::testOgUiPath in Organic groups 7.2
Tests that invalid group IDs in the menu path do not cause exceptions.
File
- og_ui/
og_ui.test, line 429
Class
Code
public function testOgUiPath() {
$this
->drupalGet('entity_test/' . $this->entity->pid . 'invalid/group');
$this
->assertResponse(403);
// Numeric values that are not consist of decimal characters are forbidden.
// 0x1 for instance is equivalent to 1
// http://php.net/manual/en/language.types.integer.php
$this
->drupalGet('entity_test/0x' . $this->entity->pid . '/group');
$this
->assertResponse(403);
// Non-existing groups return 404 however.
$this
->drupalGet('entity_test/666');
$this
->assertResponse(404);
// For the same, admin area returns 403.
$this
->drupalGet('entity_test/666/group');
$this
->assertResponse(403);
}