From 8f3e2b2e5c62a6130f6c8867ab335fb4c1a32c5c Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 4 Mar 2016 20:10:34 -0500 Subject: Helper refactoring --- tests/units/Helper/UrlHelperTest.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/units/Helper/UrlHelperTest.php') 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( 'label', $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( 'label', $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( 'label', $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()); } -- cgit v1.2.3