Code Duplication    Length = 29-29 lines in 2 locations

Tests/Functional/Command/RemoveCacheTest.php 2 locations

@@ 130-158 (lines=29) @@
127
        $this->assertFileExists($this->cacheRoot.'/thumbnail_default/images/cats2.jpeg');
128
    }
129
130
    public function testShouldRemoveCacheByMultiplePaths()
131
    {
132
        $this->filesystem->dumpFile(
133
            $this->cacheRoot.'/thumbnail_web_path/images/cats.jpeg',
134
            'anImageContent'
135
        );
136
        $this->filesystem->dumpFile(
137
            $this->cacheRoot.'/thumbnail_default/images/cats.jpeg',
138
            'anImageContent'
139
        );
140
        $this->filesystem->dumpFile(
141
            $this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg',
142
            'anImageContent2'
143
        );
144
        $this->filesystem->dumpFile(
145
            $this->cacheRoot.'/thumbnail_default/images/cats2.jpeg',
146
            'anImageContent2'
147
        );
148
149
        $this->executeConsole(
150
            new RemoveCacheCommand(),
151
            array('paths' => array('images/cats.jpeg', 'images/cats2.jpeg'))
152
        );
153
154
        $this->assertFileNotExists($this->cacheRoot.'/thumbnail_web_path/images/cats.jpeg');
155
        $this->assertFileNotExists($this->cacheRoot.'/thumbnail_default/images/cats.jpeg');
156
        $this->assertFileNotExists($this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg');
157
        $this->assertFileNotExists($this->cacheRoot.'/thumbnail_default/images/cats2.jpeg');
158
    }
159
160
    public function testShouldRemoveCacheBySingleFilter()
161
    {
@@ 190-218 (lines=29) @@
187
        $this->assertFileExists($this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg');
188
    }
189
190
    public function testShouldRemoveCacheByMultipleFilters()
191
    {
192
        $this->filesystem->dumpFile(
193
            $this->cacheRoot.'/thumbnail_web_path/images/cats.jpeg',
194
            'anImageContent'
195
        );
196
        $this->filesystem->dumpFile(
197
            $this->cacheRoot.'/thumbnail_default/images/cats.jpeg',
198
            'anImageContent'
199
        );
200
        $this->filesystem->dumpFile(
201
            $this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg',
202
            'anImageContent2'
203
        );
204
        $this->filesystem->dumpFile(
205
            $this->cacheRoot.'/thumbnail_default/images/cats2.jpeg',
206
            'anImageContent2'
207
        );
208
209
        $this->executeConsole(
210
            new RemoveCacheCommand(),
211
            array('--filters' => array('thumbnail_default', 'thumbnail_web_path'))
212
        );
213
214
        $this->assertFileNotExists($this->cacheRoot.'/thumbnail_web_path/images/cats.jpeg');
215
        $this->assertFileNotExists($this->cacheRoot.'/thumbnail_default/images/cats.jpeg');
216
        $this->assertFileNotExists($this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg');
217
        $this->assertFileNotExists($this->cacheRoot.'/thumbnail_default/images/cats2.jpeg');
218
    }
219
220
    public function testShouldRemoveCacheByOnePathAndMultipleFilters()
221
    {