diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-04 20:10:34 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-04 20:10:34 -0500 |
commit | 8f3e2b2e5c62a6130f6c8867ab335fb4c1a32c5c (patch) | |
tree | ce28cdc2dba9c31560ef753ac1b4dc39d567b7a6 /tests/units/Helper/UrlHelperTest.php | |
parent | f32507d423c46e8e9612b5239728e6c617e4cbcb (diff) |
Helper refactoring
Diffstat (limited to 'tests/units/Helper/UrlHelperTest.php')
-rw-r--r-- | tests/units/Helper/UrlHelperTest.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/units/Helper/UrlHelperTest.php b/tests/units/Helper/UrlHelperTest.php index 15e01237..34ab7604 100644 --- a/tests/units/Helper/UrlHelperTest.php +++ b/tests/units/Helper/UrlHelperTest.php @@ -2,7 +2,7 @@ require_once __DIR__.'/../Base.php'; -use Kanboard\Helper\Url; +use Kanboard\Helper\UrlHelper; use Kanboard\Model\Config; use Kanboard\Core\Http\Request; @@ -10,7 +10,7 @@ class UrlHelperTest extends Base { public function testPluginLink() { - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals( '<a href="?controller=a&action=b&d=e&plugin=something" class="f" title=\'g\' target="_blank">label</a>', $h->link('label', 'a', 'b', array('d' => 'e', 'plugin' => 'something'), false, 'f', 'g', true) @@ -22,7 +22,7 @@ class UrlHelperTest extends Base $this->container['route']->enable(); $this->container['route']->addRoute('/myplugin/something/:d', 'a', 'b', 'something'); - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals( '<a href="myplugin/something/e" class="f" title=\'g\' target="_blank">label</a>', $h->link('label', 'a', 'b', array('d' => 'e', 'plugin' => 'something'), false, 'f', 'g', true) @@ -31,7 +31,7 @@ class UrlHelperTest extends Base public function testAppLink() { - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals( '<a href="?controller=a&action=b&d=e" class="f" title=\'g\' target="_blank">label</a>', $h->link('label', 'a', 'b', array('d' => 'e'), false, 'f', 'g', true) @@ -40,7 +40,7 @@ class UrlHelperTest extends Base public function testHref() { - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals( '?controller=a&action=b&d=e', $h->href('a', 'b', array('d' => 'e')) @@ -49,7 +49,7 @@ class UrlHelperTest extends Base public function testTo() { - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals( '?controller=a&action=b&d=e', $h->to('a', 'b', array('d' => 'e')) @@ -64,7 +64,7 @@ class UrlHelperTest extends Base ) ); - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals('/kanboard/', $h->dir()); $this->container['request'] = new Request($this->container, array( @@ -73,7 +73,7 @@ class UrlHelperTest extends Base ) ); - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals('/', $h->dir()); } @@ -87,7 +87,7 @@ class UrlHelperTest extends Base ) ); - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals('http://localhost/', $h->server()); $this->container['request'] = new Request($this->container, array( @@ -98,7 +98,7 @@ class UrlHelperTest extends Base ) ); - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals('http://kb:1234/', $h->server()); } @@ -112,14 +112,14 @@ class UrlHelperTest extends Base ) ); - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals('http://kb:1234/', $h->base()); $c = new Config($this->container); $c->save(array('application_url' => 'https://mykanboard/')); $this->container['memoryCache']->flush(); - $h = new Url($this->container); + $h = new UrlHelper($this->container); $this->assertEquals('https://mykanboard/', $c->get('application_url')); $this->assertEquals('https://mykanboard/', $h->base()); } |