MediaWikiFileUrlFinderTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A testGivenUrl_urlIsReturnedAsProvided() 0 6 1
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