MediaWikiFileUrlFinderTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace Maps\Tests\Integration\DataAccess;
6
7
use Maps\DataAccess\MediaWikiFileUrlFinder;
8
use Maps\FileUrlFinder;
9
use PHPUnit\Framework\TestCase;
10
11
/**
12
 * @covers \Maps\DataAccess\MediaWikiFileUrlFinder
13
 *
14
 * @licence GNU GPL v2+
15
 * @author Jeroen De Dauw < [email protected] >
16
 */
17
class MediaWikiFileUrlFinderTest extends TestCase {
18
19
	/**
20
	 * @var FileUrlFinder
21
	 */
22
	private $urlFinder;
23
24
	public function setUp(): void {
25
		$this->urlFinder = new MediaWikiFileUrlFinder();
26
	}
27
28
	public function testGivenUrl_urlIsReturnedAsProvided() {
29
		$this->assertSame(
30
			'http://example.com/such',
31
			$this->urlFinder->getUrlForFileName( 'http://example.com/such' )
32
		);
33
	}
34
35
}
36