Passed
Pull Request — master (#123)
by
unknown
05:03
created

IiifUrlReaderTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContentCheck() 0 10 1
1
<?php
2
3
/**
4
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
5
 *
6
 * This file is part of the Kitodo and TYPO3 projects.
7
 *
8
 * @license GNU General Public License version 3 or later.
9
 * For the full copyright and license information, please read the
10
 * LICENSE.txt file that was distributed with this source code.
11
 */
12
13
namespace Kitodo\Dlf\Tests\Functional\Common;
14
15
use Kitodo\Dlf\Common\IiifUrlReader;
16
use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
17
18
class IiifUrlReaderTest extends FunctionalTestCase
19
{
20
    /**
21
     * @test
22
     * @group getContent
23
     */
24
    public function getContentCheck()
25
    {
26
        $iiifUrlReader = new IiifUrlReader();
27
28
        $correctUrl = 'http://web:8001/Tests/Fixtures/Common/correct.txt';
29
        $expected = "Correct result\n";
30
        self::assertSame($expected, $iiifUrlReader->getContent($correctUrl));
31
32
        $incorrectUrl = 'http://web:8001/incorrectPath';
33
        self::assertSame('', $iiifUrlReader->getContent($incorrectUrl));
34
    }
35
}
36