Code Duplication    Length = 19-19 lines in 2 locations

Tests/Imagine/Data/DataManagerTest.php 1 location

@@ 226-244 (lines=19) @@
223
        $dataManager->find('thumbnail', 'cats.jpeg');
224
    }
225
226
    public function testThrowIfLoaderNotRegisteredForGivenFilterOnFind()
227
    {
228
        $config = $this->createFilterConfigurationMock();
229
        $config
230
            ->expects($this->once())
231
            ->method('get')
232
            ->with('thumbnail')
233
            ->will($this->returnValue(array(
234
                'size' => array(180, 180),
235
                'mode' => 'outbound',
236
                'data_loader' => null,
237
            )))
238
        ;
239
240
        $dataManager = new DataManager($this->getMockMimeTypeGuesser(), $this->getMockExtensionGuesser(), $config);
241
242
        $this->setExpectedException('InvalidArgumentException', 'Could not find data loader "" for "thumbnail" filter type');
243
        $dataManager->find('thumbnail', 'cats.jpeg');
244
    }
245
246
    public function testShouldReturnBinaryWithLoaderContentAndGuessedMimeTypeOnFind()
247
    {

Tests/Imagine/Cache/CacheManagerTest.php 1 location

@@ 34-52 (lines=19) @@
31
        $cacheManager->addResolver('thumbnail', $resolver);
32
    }
33
34
    public function testGetBrowserPathWithoutResolver()
35
    {
36
        $config = $this->createFilterConfigurationMock();
37
        $config
38
            ->expects($this->once())
39
            ->method('get')
40
            ->with('thumbnail')
41
            ->will($this->returnValue(array(
42
                'size' => array(180, 180),
43
                'mode' => 'outbound',
44
                'cache' => null,
45
            )))
46
        ;
47
48
        $cacheManager = new CacheManager($config, $this->createRouterMock(), new Signer('secret'), $this->createEventDispatcherMock());
49
50
        $this->setExpectedException('OutOfBoundsException', 'Could not find resolver "default" for "thumbnail" filter type');
51
        $cacheManager->getBrowserPath('cats.jpeg', 'thumbnail');
52
    }
53
54
    public function testGetRuntimePath()
55
    {