mirror of
				https://github.com/brmlab/brmsklad.git
				synced 2025-10-31 08:13: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
				
			
		|  | @ -4,19 +4,18 @@ | |||
|  * | ||||
|  * Test Case for test generation shell task | ||||
|  * | ||||
|  * PHP 5 | ||||
|  * | ||||
|  * CakePHP :  Rapid Development Framework (http://cakephp.org) | ||||
|  * Copyright 2005-2012, Cake Software Foundation, Inc. | ||||
|  * 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. | ||||
|  * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||||
|  * @link          http://cakephp.org CakePHP Project | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  * @since         CakePHP v 1.2.0.7726 | ||||
|  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php) | ||||
|  * @license       http://www.opensource.org/licenses/mit-license.php MIT License | ||||
|  */ | ||||
| 
 | ||||
| App::uses('ShellDispatcher', 'Console'); | ||||
|  | @ -32,17 +31,9 @@ App::uses('Model', 'Model'); | |||
|  * Test Article model | ||||
|  * | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  */ | ||||
| class TestTaskArticle extends Model { | ||||
| 
 | ||||
| /** | ||||
|  * Model name | ||||
|  * | ||||
|  * @var string | ||||
|  */ | ||||
| 	public $name = 'TestTaskArticle'; | ||||
| 
 | ||||
| /** | ||||
|  * Table name to use | ||||
|  * | ||||
|  | @ -106,17 +97,9 @@ class TestTaskArticle extends Model { | |||
|  * Tag Testing Model | ||||
|  * | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  */ | ||||
| class TestTaskTag extends Model { | ||||
| 
 | ||||
| /** | ||||
|  * Model name | ||||
|  * | ||||
|  * @var string | ||||
|  */ | ||||
| 	public $name = 'TestTaskTag'; | ||||
| 
 | ||||
| /** | ||||
|  * Table name | ||||
|  * | ||||
|  | @ -143,7 +126,6 @@ class TestTaskTag extends Model { | |||
|  * Simulated plugin | ||||
|  * | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  */ | ||||
| class TestTaskAppModel extends Model { | ||||
| } | ||||
|  | @ -152,17 +134,9 @@ class TestTaskAppModel extends Model { | |||
|  * Testing AppMode (TaskComment) | ||||
|  * | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  */ | ||||
| class TestTaskComment extends TestTaskAppModel { | ||||
| 
 | ||||
| /** | ||||
|  * Model name | ||||
|  * | ||||
|  * @var string | ||||
|  */ | ||||
| 	public $name = 'TestTaskComment'; | ||||
| 
 | ||||
| /** | ||||
|  * Table name | ||||
|  * | ||||
|  | @ -187,17 +161,9 @@ class TestTaskComment extends TestTaskAppModel { | |||
|  * Test Task Comments Controller | ||||
|  * | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  * @package       Cake.Test.Case.Console.Command.Task | ||||
|  */ | ||||
| class TestTaskCommentsController extends Controller { | ||||
| 
 | ||||
| /** | ||||
|  * Controller Name | ||||
|  * | ||||
|  * @var string | ||||
|  */ | ||||
| 	public $name = 'TestTaskComments'; | ||||
| 
 | ||||
| /** | ||||
|  * Models to use | ||||
|  * | ||||
|  | @ -349,14 +315,14 @@ class TestTaskTest extends CakeTestCase { | |||
| 		)); | ||||
| 		$keys = ClassRegistry::keys(); | ||||
| 		$this->assertTrue(in_array('test_task_comment', $keys)); | ||||
| 		$object = $this->Task->buildTestSubject('Model', 'TestTaskComment'); | ||||
| 		$this->Task->buildTestSubject('Model', 'TestTaskComment'); | ||||
| 
 | ||||
| 		$keys = ClassRegistry::keys(); | ||||
| 		$this->assertFalse(in_array('random', $keys)); | ||||
| 	} | ||||
| 
 | ||||
| /** | ||||
|  * test that getClassName returns the user choice as a classname. | ||||
|  * test that getClassName returns the user choice as a class name. | ||||
|  * | ||||
|  * @return void | ||||
|  */ | ||||
|  | @ -391,7 +357,7 @@ class TestTaskTest extends CakeTestCase { | |||
| 	} | ||||
| 
 | ||||
| /** | ||||
|  * test that resolving classnames works | ||||
|  * test that resolving class names works | ||||
|  * | ||||
|  * @return void | ||||
|  */ | ||||
|  | @ -425,8 +391,8 @@ class TestTaskTest extends CakeTestCase { | |||
| 	} | ||||
| 
 | ||||
| /** | ||||
|  * test baking files.  The conditionally run tests are known to fail in PHP4 | ||||
|  * as PHP4 classnames are all lower case, breaking the plugin path inflection. | ||||
|  * test baking files. The conditionally run tests are known to fail in PHP4 | ||||
|  * as PHP4 class names are all lower case, breaking the plugin path inflection. | ||||
|  * | ||||
|  * @return void | ||||
|  */ | ||||
|  | @ -447,6 +413,8 @@ class TestTaskTest extends CakeTestCase { | |||
| 
 | ||||
| 		$this->assertContains('function testDoSomething()', $result); | ||||
| 		$this->assertContains('function testDoSomethingElse()', $result); | ||||
| 		$this->assertContains('$this->markTestIncomplete(\'testDoSomething not implemented.\')', $result); | ||||
| 		$this->assertContains('$this->markTestIncomplete(\'testDoSomethingElse not implemented.\')', $result); | ||||
| 
 | ||||
| 		$this->assertContains("'app.test_task_article'", $result); | ||||
| 		$this->assertContains("'app.test_task_comment'", $result); | ||||
|  | @ -566,6 +534,8 @@ class TestTaskTest extends CakeTestCase { | |||
| 
 | ||||
| /** | ||||
|  * Test generateUses() | ||||
|  * | ||||
|  * @return void | ||||
|  */ | ||||
| 	public function testGenerateUses() { | ||||
| 		$result = $this->Task->generateUses('model', 'Model', 'Post'); | ||||
|  | @ -694,7 +664,7 @@ class TestTaskTest extends CakeTestCase { | |||
| 	public function testTestCaseFileNamePlugin() { | ||||
| 		$this->Task->path = DS . 'my' . DS . 'path' . DS . 'tests' . DS; | ||||
| 
 | ||||
| 		CakePlugin::load('TestTest', array('path' => APP . 'Plugin' . DS . 'TestTest' . DS )); | ||||
| 		CakePlugin::load('TestTest', array('path' => APP . 'Plugin' . DS . 'TestTest' . DS)); | ||||
| 		$this->Task->plugin = 'TestTest'; | ||||
| 		$result = $this->Task->testCaseFileName('Model', 'Post'); | ||||
| 		$expected = APP . 'Plugin' . DS . 'TestTest' . DS . 'Test' . DS . 'Case' . DS . 'Model' . DS . 'PostTest.php'; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brm Ko
						Brm Ko