mirror of
				https://github.com/brmlab/brmsklad.git
				synced 2025-10-31 00:03:58 +01: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
				
			
		|  | @ -2,19 +2,18 @@ | |||
| /** | ||||
|  * ComponentTest file | ||||
|  * | ||||
|  * 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.0.5436 | ||||
|  * @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'); | ||||
|  | @ -27,19 +26,15 @@ App::uses('Component', 'Controller'); | |||
|  */ | ||||
| class ParamTestComponent extends Component { | ||||
| 
 | ||||
| /** | ||||
|  * name property | ||||
|  * | ||||
|  * @var string 'ParamTest' | ||||
|  */ | ||||
| 	public $name = 'ParamTest'; | ||||
| 
 | ||||
| /** | ||||
|  * components property | ||||
|  * | ||||
|  * @var array | ||||
|  */ | ||||
| 	public $components = array('Banana' => array('config' => 'value')); | ||||
| 	public $components = array( | ||||
| 		'Apple' => array('enabled' => true), | ||||
| 		'Banana' => array('config' => 'value'), | ||||
| 	); | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  | @ -49,13 +44,6 @@ class ParamTestComponent extends Component { | |||
|  */ | ||||
| class ComponentTestController extends Controller { | ||||
| 
 | ||||
| /** | ||||
|  * name property | ||||
|  * | ||||
|  * @var string 'ComponentTest' | ||||
|  */ | ||||
| 	public $name = 'ComponentTest'; | ||||
| 
 | ||||
| /** | ||||
|  * uses property | ||||
|  * | ||||
|  | @ -82,7 +70,7 @@ class AppleComponent extends Component { | |||
| /** | ||||
|  * testName property | ||||
|  * | ||||
|  * @var mixed null | ||||
|  * @var mixed | ||||
|  */ | ||||
| 	public $testName = null; | ||||
| 
 | ||||
|  | @ -145,7 +133,7 @@ class BananaComponent extends Component { | |||
| /** | ||||
|  * testField property | ||||
|  * | ||||
|  * @var string 'BananaField' | ||||
|  * @var string | ||||
|  */ | ||||
| 	public $testField = 'BananaField'; | ||||
| 
 | ||||
|  | @ -206,7 +194,6 @@ class SomethingWithEmailComponent extends Component { | |||
| 	public $components = array('Email'); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /** | ||||
|  * ComponentTest class | ||||
|  * | ||||
|  | @ -302,4 +289,17 @@ class ComponentTest extends CakeTestCase { | |||
| 		$this->assertInstanceOf('EmailComponent', $Controller->SomethingWithEmail->Email); | ||||
| 	} | ||||
| 
 | ||||
| /** | ||||
|  * Test lazy loading of components inside components and both explicit and | ||||
|  * implicit 'enabled' setting. | ||||
|  * | ||||
|  * @return void | ||||
|  */ | ||||
| 	public function testGet() { | ||||
| 		$Collection = new ComponentCollection(); | ||||
| 		$ParamTest = $Collection->load('ParamTest'); | ||||
| 		$this->assertTrue($ParamTest->Apple->settings['enabled']); | ||||
| 		$this->assertFalse($ParamTest->Banana->settings['enabled']); | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brm Ko
						Brm Ko