Upgrade CakePHP from 2.2.5 to 2.9.5

This commit is contained in:
Brm Ko 2017-02-26 15:29:44 +01:00
parent 5a580df460
commit 235a541597
793 changed files with 60746 additions and 23753 deletions

View file

@ -4,19 +4,18 @@
*
* Test Case for project 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.3.0
* @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');
@ -150,7 +149,7 @@ class ProjectTaskTest extends CakeTestCase {
}
/**
* test bake with CakePHP on the include path. The constants should remain commented out.
* test bake with CakePHP on the include path. The constants should remain commented out.
*
* @return void
*/
@ -198,7 +197,6 @@ class ProjectTaskTest extends CakeTestCase {
'Test' . DS . 'Case' . DS . 'View' . DS . 'Helper' => 'empty',
'Test' . DS . 'Fixture' => 'empty',
'Vendor' => 'empty',
'View' . DS . 'Elements' => 'empty',
'View' . DS . 'Scaffolds' => 'empty',
'tmp' . DS . 'cache' . DS . 'models' => 'empty',
'tmp' . DS . 'cache' . DS . 'persistent' => 'empty',
@ -249,6 +247,24 @@ class ProjectTaskTest extends CakeTestCase {
$this->assertNotRegExp('/76859309657453542496749683645/', $contents, 'Default CipherSeed left behind. %s');
}
/**
* test generation of cache prefix
*
* @return void
*/
public function testCachePrefixGeneration() {
$this->_setupTestProject();
$path = $this->Task->path . 'bake_test_app' . DS;
$result = $this->Task->cachePrefix($path);
$this->assertTrue($result);
$File = new File($path . 'Config' . DS . 'core.php');
$contents = $File->read();
$this->assertRegExp('/\$prefix = \'.+\';/', $contents, '$prefix is not defined');
$this->assertNotRegExp('/\$prefix = \'myapp_\';/', $contents, 'Default cache prefix left behind. %s');
}
/**
* Test that index.php is generated correctly.
*