mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
"Correcting typo"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6106 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
61eebea0f4
commit
13530f42dc
2 changed files with 3 additions and 1 deletions
|
@ -874,6 +874,7 @@ class Controller extends Object {
|
|||
$object = $this->{$this->modelClass};
|
||||
} else {
|
||||
$className = null;
|
||||
$name = $this->uses[0];
|
||||
if (strpos($this->uses[0], '.') !== false) {
|
||||
list($name, $className) = explode('.', $this->uses[0]);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,6 @@ class ControllerTest extends CakeTestCase {
|
|||
$Controller->passedArgs[] = '1';
|
||||
$Controller->params['url'] = array();
|
||||
$Controller->constructClasses();
|
||||
$Controller->modelClass = null;
|
||||
|
||||
$results = Set::extract($Controller->paginate('ControllerPost'), '{n}.ControllerPost.id');
|
||||
$this->assertEqual($results, array(1, 2, 3));
|
||||
|
@ -92,6 +91,8 @@ class ControllerTest extends CakeTestCase {
|
|||
$results = Set::extract($Controller->paginate('ControllerComment'), '{n}.ControllerComment.id');
|
||||
$this->assertEqual($results, array(1, 2, 3, 4, 5, 6));
|
||||
|
||||
$Controller->modelClass = null;
|
||||
|
||||
$Controller->uses[0] = 'Plugin.ControllerPost';
|
||||
$results = Set::extract($Controller->paginate(), '{n}.ControllerPost.id');
|
||||
$this->assertEqual($results, array(1, 2, 3));
|
||||
|
|
Loading…
Reference in a new issue