Code Duplication    Length = 17-17 lines in 2 locations

tests/php/Controller/AssetAdminTest.php 2 locations

@@ 113-129 (lines=17) @@
110
        $this->assertEquals('testItCreatesFolder', $newFolder->Name);
111
    }
112
113
    public function testItRestrictsCreateFolderByCanCreate()
114
    {
115
        $folder = $this->objFromFixture(Folder::class, 'folder1');
116
117
        $response = Director::test(
118
            'admin/assets/api/createFolder',
119
            [
120
                'ParentID' => $folder->ID,
121
                'Name' => 'disallowCanCreate',
122
                'SecurityID' => SecurityToken::inst()->getValue(),
123
            ],
124
            $this->session,
125
            'POST'
126
        );
127
        $this->assertTrue($response->isError());
128
        $this->assertEquals(403, $response->getStatusCode());
129
    }
130
131
    public function testItRestrictsCreateFolderByCanAddChildren()
132
    {
@@ 131-147 (lines=17) @@
128
        $this->assertEquals(403, $response->getStatusCode());
129
    }
130
131
    public function testItRestrictsCreateFolderByCanAddChildren()
132
    {
133
        $folder = $this->objFromFixture(Folder::class, 'disallowCanAddChildren');
134
135
        $response = Director::test(
136
            'admin/assets/api/createFolder',
137
            [
138
                'ParentID' => $folder->ID,
139
                'Name' => 'testItRestrictsCreateFolderByCanAddChildren',
140
                'SecurityID' => SecurityToken::inst()->getValue(),
141
            ],
142
            $this->session,
143
            'POST'
144
        );
145
        $this->assertTrue($response->isError());
146
        $this->assertEquals(403, $response->getStatusCode());
147
    }
148
149
    public function testItCreatesFile()
150
    {