Code Duplication    Length = 17-17 lines in 2 locations

src/WebBundle/Tests/Acceptance/AccessRightsTest.php 2 locations

@@ 59-75 (lines=17) @@
56
        $this->assertAccessRights('/browse/index.md?action=delete', null, $this->getUser(Users::WATCHER));
57
    }
58
59
    public function testCommitterRights()
60
    {
61
        $this->assertAccessRights('/history', 200, $this->getUser(Users::COMMITTER));
62
63
        $this->assertAccessRights('/browse/', 302, $this->getUser(Users::COMMITTER));
64
        $this->assertAccessRights('/browse/?action=list', 200, $this->getUser(Users::COMMITTER));
65
        $this->assertAccessRights('/browse/?action=file.upload', 200, $this->getUser(Users::COMMITTER));
66
        $this->assertAccessRights('/browse/?action=file.create&extension=txt', 200, $this->getUser(Users::COMMITTER));
67
        $this->assertAccessRights('/browse/?action=file.create&extension=md', 200, $this->getUser(Users::COMMITTER));
68
        $this->assertAccessRights('/browse/?action=subdirectory.create', 200, $this->getUser(Users::COMMITTER));
69
70
        $this->assertAccessRights('/browse/index.md', 200, $this->getUser(Users::COMMITTER));
71
        $this->assertAccessRights('/browse/index.md?action=history', 200, $this->getUser(Users::COMMITTER));
72
        $this->assertAccessRights('/browse/index.md?action=edit', 200, $this->getUser(Users::COMMITTER));
73
        $this->assertAccessRights('/browse/index.md?action=move', 200, $this->getUser(Users::COMMITTER));
74
        $this->assertAccessRights('/browse/index.md?action=delete', 302, $this->getUser(Users::COMMITTER));
75
    }
76
77
    public function testAdminRights()
78
    {
@@ 77-93 (lines=17) @@
74
        $this->assertAccessRights('/browse/index.md?action=delete', 302, $this->getUser(Users::COMMITTER));
75
    }
76
77
    public function testAdminRights()
78
    {
79
        $this->assertAccessRights('/history', 200, $this->getUser(Users::ADMIN));
80
81
        $this->assertAccessRights('/browse/', 302, $this->getUser(Users::ADMIN));
82
        $this->assertAccessRights('/browse/?action=list', 200, $this->getUser(Users::ADMIN));
83
        $this->assertAccessRights('/browse/?action=file.upload', 200, $this->getUser(Users::ADMIN));
84
        $this->assertAccessRights('/browse/?action=file.create&extension=txt', 200, $this->getUser(Users::ADMIN));
85
        $this->assertAccessRights('/browse/?action=file.create&extension=md', 200, $this->getUser(Users::ADMIN));
86
        $this->assertAccessRights('/browse/?action=subdirectory.create', 200, $this->getUser(Users::ADMIN));
87
88
        $this->assertAccessRights('/browse/index.md', 200, $this->getUser(Users::ADMIN));
89
        $this->assertAccessRights('/browse/index.md?action=history', 200, $this->getUser(Users::ADMIN));
90
        $this->assertAccessRights('/browse/index.md?action=edit', 200, $this->getUser(Users::ADMIN));
91
        $this->assertAccessRights('/browse/index.md?action=move', 200, $this->getUser(Users::ADMIN));
92
        $this->assertAccessRights('/browse/index.md?action=delete', 302, $this->getUser(Users::ADMIN));
93
    }
94
95
    /**
96
     * @param string $url            The url to test.