Passed
Branch master (71c281)
by Wanderson
01:19
created

UrlTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Win\Helper;
4
5
use Win\Helper\Url;
6
7
class UrlTest extends \PHPUnit_Framework_TestCase {
8
9
	public function testFormat() {
10
		Url::instance()->setSufix('/');
11
		$link = 'my-custom-link';
12
		$formatedLink = Url::instance()->format($link);
13
		$this->assertEquals($formatedLink, 'my-custom-link/');
14
15
		$linkBar = 'my-custom-link/';
16
		$formatedLinkBar = Url::instance()->format($linkBar);
17
		$this->assertEquals($formatedLinkBar, 'my-custom-link/');
18
	}
19
20
	public function testFormatExtension() {
21
		Url::instance()->setSufix('.html');
22
		$link2 = 'my-custom-link-with-extension';
23
		$formatedLink2 = Url::instance()->format($link2);
24
		$this->assertEquals($formatedLink2, 'my-custom-link-with-extension.html');
25
	}
26
27
}
28