mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Correcting file layout in test_app. Fixing tests in Configure test and ThemeView Test.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7413 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
bdf4c8406c
commit
5ff62650e5
5 changed files with 63 additions and 3 deletions
|
@ -159,7 +159,7 @@ class ThemeViewTest extends CakeTestCase {
|
||||||
function testPluginGetTemplate() {
|
function testPluginGetTemplate() {
|
||||||
$this->Controller->plugin = 'test_plugin';
|
$this->Controller->plugin = 'test_plugin';
|
||||||
$this->Controller->name = 'TestPlugin';
|
$this->Controller->name = 'TestPlugin';
|
||||||
$this->Controller->viewPath = 'test_plugin';
|
$this->Controller->viewPath = 'tests';
|
||||||
$this->Controller->action = 'index';
|
$this->Controller->action = 'index';
|
||||||
$this->Controller->theme = 'test_plugin_theme';
|
$this->Controller->theme = 'test_plugin_theme';
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ class ThemeViewTest extends CakeTestCase {
|
||||||
Configure::write('pluginPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS));
|
Configure::write('pluginPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS));
|
||||||
Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS));
|
Configure::write('viewPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS));
|
||||||
|
|
||||||
$expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS . 'themed' . DS . 'test_plugin_theme' . DS .'test_plugin' . DS .'index.ctp';
|
$expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS . 'themed' . DS . 'test_plugin_theme' . DS .'tests' . DS .'index.ctp';
|
||||||
$result = $ThemeView->getViewFileName('index');
|
$result = $ThemeView->getViewFileName('index');
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* @lastmodified $Date$
|
* @lastmodified $Date$
|
||||||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||||
*/
|
*/
|
||||||
class TestsController extends AppController {
|
class TestsController extends TestPluginAppController {
|
||||||
var $name = 'Tests';
|
var $name = 'Tests';
|
||||||
var $uses = array();
|
var $uses = array();
|
||||||
var $helpers = array('TestPlugin.OtherHelper', 'Html');
|
var $helpers = array('TestPlugin.OtherHelper', 'Html');
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
/* SVN FILE: $Id$ */
|
||||||
|
/**
|
||||||
|
* Test Suite TestPlugin AppController
|
||||||
|
*
|
||||||
|
* Long description for file
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
||||||
|
* Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||||
|
* 1785 E. Sahara Avenue, Suite 490-204
|
||||||
|
* Las Vegas, Nevada 89104
|
||||||
|
*
|
||||||
|
* Licensed under The Open Group Test Suite License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @filesource
|
||||||
|
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||||
|
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
|
||||||
|
* @package cake.tests
|
||||||
|
* @subpackage cake.tests.cases.libs
|
||||||
|
* @since CakePHP(tm) v 1.2.0.5432
|
||||||
|
* @version $Rev$
|
||||||
|
* @modifiedby $LastChangedBy$
|
||||||
|
* @lastmodified $Date$
|
||||||
|
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||||
|
*/
|
||||||
|
class TestPluginAppController extends AppController { }
|
||||||
|
?>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
/* SVN FILE: $Id$ */
|
||||||
|
/**
|
||||||
|
* Test Suite TestPlugin AppModel
|
||||||
|
*
|
||||||
|
* Long description for file
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
||||||
|
* Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||||
|
* 1785 E. Sahara Avenue, Suite 490-204
|
||||||
|
* Las Vegas, Nevada 89104
|
||||||
|
*
|
||||||
|
* Licensed under The Open Group Test Suite License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @filesource
|
||||||
|
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
|
||||||
|
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
|
||||||
|
* @package cake.tests
|
||||||
|
* @subpackage cake.tests.cases.libs
|
||||||
|
* @since CakePHP(tm) v 1.2.0.5432
|
||||||
|
* @version $Rev$
|
||||||
|
* @modifiedby $LastChangedBy$
|
||||||
|
* @lastmodified $Date$
|
||||||
|
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||||
|
*/
|
||||||
|
class TestPluginAppModel extends AppModel {}
|
||||||
|
?>
|
Loading…
Reference in a new issue