mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-08-03 14:43:49 +02:00
Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
parent
5a580df460
commit
235a541597
793 changed files with 60746 additions and 23753 deletions
|
@ -4,27 +4,26 @@
|
|||
*
|
||||
* Isolated from the Controller and Component test as to not pollute their AppController class
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
|
||||
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
|
||||
* @package Cake.Test.Case.Controller
|
||||
* @since CakePHP(tm) v 1.2.3
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('Controller', 'Controller');
|
||||
|
||||
/**
|
||||
* Test case AppController
|
||||
*
|
||||
* @package Cake.Test.Case.Controller
|
||||
* @package Cake.Test.Case.Controller
|
||||
*/
|
||||
class MergeVarsAppController extends Controller {
|
||||
|
||||
|
@ -48,7 +47,7 @@ class MergeVarsAppController extends Controller {
|
|||
*
|
||||
* @package Cake.Test.Case.Controller
|
||||
*/
|
||||
class MergeVarComponent extends Object {
|
||||
class MergeVarComponent extends CakeObject {
|
||||
|
||||
}
|
||||
|
||||
|
@ -59,13 +58,6 @@ class MergeVarComponent extends Object {
|
|||
*/
|
||||
class MergeVariablesController extends MergeVarsAppController {
|
||||
|
||||
/**
|
||||
* name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'MergeVariables';
|
||||
|
||||
/**
|
||||
* uses
|
||||
*
|
||||
|
@ -100,7 +92,7 @@ class MergeVarPluginAppController extends MergeVarsAppController {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $helpers = array('Javascript');
|
||||
public $helpers = array('Js');
|
||||
|
||||
/**
|
||||
* parent for mergeVars
|
||||
|
@ -117,13 +109,6 @@ class MergeVarPluginAppController extends MergeVarsAppController {
|
|||
*/
|
||||
class MergePostsController extends MergeVarPluginAppController {
|
||||
|
||||
/**
|
||||
* name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'MergePosts';
|
||||
|
||||
/**
|
||||
* uses
|
||||
*
|
||||
|
@ -132,7 +117,6 @@ class MergePostsController extends MergeVarPluginAppController {
|
|||
public $uses = array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test Case for Controller Merging of Vars.
|
||||
*
|
||||
|
@ -219,7 +203,7 @@ class ControllerMergeVarsTest extends CakeTestCase {
|
|||
|
||||
$expected = array(
|
||||
'MergeVar' => array('format' => 'html', 'terse'),
|
||||
'Javascript' => null
|
||||
'Js' => null
|
||||
);
|
||||
$this->assertEquals($expected, $Controller->helpers, 'Helpers are unexpected.');
|
||||
|
||||
|
@ -249,4 +233,18 @@ class ControllerMergeVarsTest extends CakeTestCase {
|
|||
|
||||
$this->assertFalse(isset($Controller->Session));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that $modelClass is correct even when Controller::$uses
|
||||
* has been iterated, eg: by a Component, or event handlers.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testMergeVarsModelClass() {
|
||||
$Controller = new MergeVariablescontroller();
|
||||
$Controller->uses = array('Test', 'TestAlias');
|
||||
$Controller->constructClasses();
|
||||
$this->assertEquals($Controller->uses[0], $Controller->modelClass);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue