euromark 11 years ago
parent
commit
65c23110b7

+ 0 - 9
src/View/Helper/PaginatorHelper.php

@@ -85,15 +85,6 @@ class PaginatorHelper extends Helper {
 	public function __construct(View $View, array $config = array()) {
 		parent::__construct($View, $config);
 
-		$this->setUpUrl();
-	}
-
-/**
- * Merges passed args with URL options.
- *
- * @return void
- */
-	public function setUpUrl() {
 		$this->config(
 			'options.url',
 			array_merge($this->request->params['pass'], $this->request->query)

+ 2 - 2
tests/TestCase/View/Helper/PaginatorHelperTest.php

@@ -15,7 +15,6 @@
 namespace Cake\Test\TestCase\View\Helper;
 
 use Cake\Core\Configure;
-use Cake\Event\Event;
 use Cake\Network\Request;
 use Cake\Routing\Router;
 use Cake\TestSuite\TestCase;
@@ -739,7 +738,8 @@ class PaginatorHelperTest extends TestCase {
 
 		$this->Paginator->request->params['pass'] = array(2);
 		$this->Paginator->request->query = array('page' => 1, 'foo' => 'bar', 'x' => 'y');
-		$this->Paginator->setUpUrl();
+		$this->View->request = $this->Paginator->request;
+		$this->Paginator = new PaginatorHelper($this->View);
 
 		$result = $this->Paginator->sort('title');
 		$expected = array(