Code Duplication    Length = 7-8 lines in 2 locations

tests/controllers/UserControllerTest.php 2 locations

@@ 32-39 (lines=8) @@
29
    /**
30
     * Tests redirected to a login screen if you're logged out.
31
     */
32
    public function testCantAccessWhenLoggedOut()
33
    {
34
        $this->logoutMember();
35
        $response = $this->get($this->controller->Link('index'));
36
        $this->assertFalse($response->isError());
37
        $this->assertEquals(302, $response->getStatusCode());
38
        $this->autoFollowRedirection = true;
39
    }
40
41
    /**
42
     * Tests that you can't access the index action without the requisite permission
@@ 44-50 (lines=7) @@
41
    /**
42
     * Tests that you can't access the index action without the requisite permission
43
     */
44
    public function testCantAccessWithoutPermission()
45
    {
46
        $this->loginInAsSomeone('john');
47
        $response = $this->get($this->controller->Link('index'));
48
        $this->assertEquals(403, $response->getStatusCode());
49
        $this->autoFollowRedirection = true;
50
    }
51
52
    /**
53
     * Tests if a form is returned and that expected fields are present