Code Duplication    Length = 16-20 lines in 2 locations

Tests/Service/FindDirectoryServiceTest.php 2 locations

@@ 111-126 (lines=16) @@
108
    /**
109
     * Test find empty result
110
     */
111
    public function testFindEmptyResult()
112
    {
113
        $find_directory_service = $this->setPatternAndDirectory('bad');
114
        $this->lister_mock->expects($this->once())
115
            ->method('ls')
116
            ->will($this->returnValue(new \GlobIterator(
117
                __DIR__ . '/../Fixtures/directory/*'
118
            )));
119
        $this->finder_mock->expects($this->exactly(4))
120
            ->method('find')
121
            ->will($this->returnValue(false));
122
123
        $found = $find_directory_service->find();
124
125
        $this->assertEquals(0, count($found));
126
    }
127
128
    /**
129
     * Test find result
@@ 169-188 (lines=20) @@
166
    /**
167
     * Test find empty result, extension set
168
     */
169
    public function testFindEmptyResultExtensionSet()
170
    {
171
        $find_directory_service = $this->setPatternAndDirectory(
172
            'bad',
173
            '/../Fixtures/directory',
174
            'txt'
175
        );
176
        $this->lister_mock->expects($this->once())
177
            ->method('ls')
178
            ->will($this->returnValue(new \GlobIterator(
179
                __DIR__ . '/../Fixtures/directory/*.txt'
180
            )));
181
        $this->finder_mock->expects($this->exactly(2))
182
            ->method('find')
183
            ->will($this->returnValue(false));
184
185
        $found = $find_directory_service->find();
186
187
        $this->assertEquals(0, count($found));
188
    }
189
190
    /**
191
     * Test find result, extension set