Completed
Push — MediaWikiFileUrlFinderTest ( d58bee )
by Jeroen De
03:36
created

MediaWikiFileUrlFinderTest   A

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
namespace Maps\Tests\System\DataAccess;
4
5
use Maps\DataAccess\MediaWikiFileUrlFinder;
6
use Maps\FileUrlFinder;
7
use PHPUnit\Framework\TestCase;
8
9
/**
10
 * @covers \Maps\DataAccess\MediaWikiFileUrlFinder
11
 *
12
 * @licence GNU GPL v2+
13
 * @author Jeroen De Dauw < [email protected] >
14
 */
15
class MediaWikiFileUrlFinderTest extends TestCase {
16
17
	/**
18
	 * @var FileUrlFinder
19
	 */
20
	private $urlFinder;
21
22
	public function setUp() {
23
		$this->urlFinder = new MediaWikiFileUrlFinder();
24
	}
25
26
	public function testGivenUrl_urlIsReturnedAsProvided() {
27
		$this->assertSame(
28
			'http://example.com/such',
29
			$this->urlFinder->getUrlForFileName( 'http://example.com/such' )
30
		);
31
	}
32
33
}
34