1 | <?php |
||
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 |