mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Use App::RESET instead of true with App::build()
This commit is contained in:
parent
6684b775cd
commit
c4829dc3b8
26 changed files with 42 additions and 40 deletions
|
@ -88,7 +88,7 @@ class CacheTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Lib' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
|
'Lib' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
|
|
||||||
$settings = array('engine' => 'TestAppCache', 'path' => TMP, 'prefix' => 'cake_test_');
|
$settings = array('engine' => 'TestAppCache', 'path' => TMP, 'prefix' => 'cake_test_');
|
||||||
|
@ -260,7 +260,7 @@ class CacheTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
|
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
|
|
||||||
$result = Cache::drop('some_config_that_does_not_exist');
|
$result = Cache::drop('some_config_that_does_not_exist');
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
|
@ -312,7 +312,7 @@ class CacheTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
|
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
|
|
||||||
Cache::config('test_trigger', array('engine' => 'TestAppCache', 'prefix' => ''));
|
Cache::config('test_trigger', array('engine' => 'TestAppCache', 'prefix' => ''));
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -85,7 +85,7 @@ class PhpReaderTest extends CakeTestCase {
|
||||||
public function testReadPluginValue() {
|
public function testReadPluginValue() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
$reader = new PhpReader($this->path);
|
$reader = new PhpReader($this->path);
|
||||||
$result = $reader->read('TestPlugin.load');
|
$result = $reader->read('TestPlugin.load');
|
||||||
|
|
|
@ -46,7 +46,7 @@ class CommandListShellTest extends CakeTestCase {
|
||||||
'Console/Command' => array(
|
'Console/Command' => array(
|
||||||
CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
|
CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
|
||||||
)
|
)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
|
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
|
||||||
|
|
||||||
$out = new TestStringOutput();
|
$out = new TestStringOutput();
|
||||||
|
|
|
@ -336,7 +336,7 @@ class SchemaShellTest extends CakeTestCase {
|
||||||
public function testGenerateWithPlugins() {
|
public function testGenerateWithPlugins() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
|
|
||||||
$this->db->cacheSources = false;
|
$this->db->cacheSources = false;
|
||||||
|
|
|
@ -573,7 +573,7 @@ class TestTaskTest extends CakeTestCase {
|
||||||
$testApp = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS;
|
$testApp = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS;
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array($testApp)
|
'plugins' => array($testApp)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
|
|
||||||
$this->Task->plugin = 'TestPlugin';
|
$this->Task->plugin = 'TestPlugin';
|
||||||
|
|
|
@ -119,7 +119,7 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
'Console/Command' => array(
|
'Console/Command' => array(
|
||||||
CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
|
CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
|
||||||
)
|
)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ class ShellTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
||||||
'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
|
'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
|
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
$this->Shell->uses = array('TestPlugin.TestPluginPost');
|
$this->Shell->uses = array('TestPlugin.TestPluginPost');
|
||||||
|
|
|
@ -160,7 +160,7 @@ class FormAuthenticateTest extends CakeTestCase {
|
||||||
Cache::delete('object_map', '_cake_core_');
|
Cache::delete('object_map', '_cake_core_');
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
|
|
||||||
$ts = date('Y-m-d H:i:s');
|
$ts = date('Y-m-d H:i:s');
|
||||||
|
|
|
@ -712,7 +712,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
||||||
public function testAjaxRedirectAsRequestAction() {
|
public function testAjaxRedirectAsRequestAction() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
|
|
||||||
$this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
|
$this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
|
||||||
$this->Controller->request = $this->getMock('CakeRequest');
|
$this->Controller->request = $this->getMock('CakeRequest');
|
||||||
|
@ -741,7 +741,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
||||||
public function testAjaxRedirectAsRequestActionStillRenderingLayout() {
|
public function testAjaxRedirectAsRequestActionStillRenderingLayout() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
|
|
||||||
$this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
|
$this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
|
||||||
$this->Controller->request = $this->getMock('CakeRequest');
|
$this->Controller->request = $this->getMock('CakeRequest');
|
||||||
|
|
|
@ -624,7 +624,7 @@ class ControllerTest extends CakeTestCase {
|
||||||
public function testRender() {
|
public function testRender() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
ClassRegistry::flush();
|
ClassRegistry::flush();
|
||||||
$request = new CakeRequest('controller_posts/index');
|
$request = new CakeRequest('controller_posts/index');
|
||||||
$request->params['action'] = 'index';
|
$request->params['action'] = 'index';
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CakePluginTest extends CakeTestCase {
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
App::objects('plugins', null, false);
|
App::objects('plugins', null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -255,7 +255,9 @@ class ConfigureTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testLoadPlugin() {
|
public function testLoadPlugin() {
|
||||||
App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), true);
|
App::build(array(
|
||||||
|
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
|
), App::RESET);
|
||||||
Configure::config('test', new PhpReader());
|
Configure::config('test', new PhpReader());
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
$result = Configure::load('TestPlugin.load', 'test');
|
$result = Configure::load('TestPlugin.load', 'test');
|
||||||
|
|
|
@ -449,7 +449,7 @@ class ObjectTest extends CakeTestCase {
|
||||||
'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
|
'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
|
||||||
'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
|
'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
|
||||||
'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS)
|
'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
$this->assertNull(Router::getRequest(), 'request stack should be empty.');
|
$this->assertNull(Router::getRequest(), 'request stack should be empty.');
|
||||||
|
|
||||||
$result = $this->object->requestAction('');
|
$result = $this->object->requestAction('');
|
||||||
|
@ -489,7 +489,7 @@ class ObjectTest extends CakeTestCase {
|
||||||
public function testRequestActionPlugins() {
|
public function testRequestActionPlugins() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
Router::reload();
|
Router::reload();
|
||||||
|
|
||||||
|
@ -529,7 +529,7 @@ class ObjectTest extends CakeTestCase {
|
||||||
'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
|
'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
|
||||||
'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
|
'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load(array('TestPlugin'));
|
CakePlugin::load(array('TestPlugin'));
|
||||||
|
|
||||||
$result = $this->object->requestAction(
|
$result = $this->object->requestAction(
|
||||||
|
|
|
@ -41,7 +41,7 @@ class ErrorHandlerTest extends CakeTestCase {
|
||||||
'View' => array(
|
'View' => array(
|
||||||
CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
|
CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
|
||||||
)
|
)
|
||||||
), true);
|
), App::RESET);
|
||||||
Router::reload();
|
Router::reload();
|
||||||
|
|
||||||
$request = new CakeRequest(null, false);
|
$request = new CakeRequest(null, false);
|
||||||
|
@ -232,7 +232,7 @@ class ErrorHandlerTest extends CakeTestCase {
|
||||||
'plugins' => array(
|
'plugins' => array(
|
||||||
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
|
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
|
||||||
)
|
)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
Configure::write('Exception.renderer', 'TestPlugin.TestPluginExceptionRenderer');
|
Configure::write('Exception.renderer', 'TestPlugin.TestPluginExceptionRenderer');
|
||||||
$error = new NotFoundException('Kaboom!');
|
$error = new NotFoundException('Kaboom!');
|
||||||
|
|
|
@ -155,7 +155,7 @@ class ExceptionRendererTest extends CakeTestCase {
|
||||||
'views' => array(
|
'views' => array(
|
||||||
CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
|
CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
|
||||||
)
|
)
|
||||||
), true);
|
), App::RESET);
|
||||||
Router::reload();
|
Router::reload();
|
||||||
|
|
||||||
$request = new CakeRequest(null, false);
|
$request = new CakeRequest(null, false);
|
||||||
|
|
|
@ -35,7 +35,7 @@ class I18nTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS),
|
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS),
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load(array('TestPlugin'));
|
CakePlugin::load(array('TestPlugin'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ class CakeLogTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
|
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
|
|
||||||
$result = CakeLog::config('libtest', array(
|
$result = CakeLog::config('libtest', array(
|
||||||
|
|
|
@ -504,7 +504,7 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS
|
CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS
|
||||||
),
|
),
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
Configure::write('Session', array(
|
Configure::write('Session', array(
|
||||||
'defaults' => 'cake',
|
'defaults' => 'cake',
|
||||||
'handler' => array(
|
'handler' => array(
|
||||||
|
@ -525,7 +525,7 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
public function testUsingPluginHandler() {
|
public function testUsingPluginHandler() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
|
|
||||||
Configure::write('Session', array(
|
Configure::write('Session', array(
|
||||||
|
|
|
@ -1038,7 +1038,7 @@ class DispatcherTest extends CakeTestCase {
|
||||||
Router::reload();
|
Router::reload();
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
|
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
|
||||||
|
|
||||||
$Dispatcher = new TestDispatcher();
|
$Dispatcher = new TestDispatcher();
|
||||||
|
@ -1114,7 +1114,7 @@ class DispatcherTest extends CakeTestCase {
|
||||||
$Dispatcher = new TestDispatcher();
|
$Dispatcher = new TestDispatcher();
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
), APP::RESET);
|
), App::RESET);
|
||||||
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
|
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
|
||||||
Router::reload();
|
Router::reload();
|
||||||
Router::parse('/');
|
Router::parse('/');
|
||||||
|
@ -1396,7 +1396,7 @@ class DispatcherTest extends CakeTestCase {
|
||||||
|
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
|
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
|
||||||
), true);
|
), App::RESET);
|
||||||
|
|
||||||
$dispatcher = new TestDispatcher();
|
$dispatcher = new TestDispatcher();
|
||||||
$request = new CakeRequest($url);
|
$request = new CakeRequest($url);
|
||||||
|
|
|
@ -1187,7 +1187,7 @@ class RouterTest extends CakeTestCase {
|
||||||
'plugins' => array(
|
'plugins' => array(
|
||||||
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
|
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
|
||||||
)
|
)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load(array('TestPlugin'));
|
CakePlugin::load(array('TestPlugin'));
|
||||||
|
|
||||||
Router::reload();
|
Router::reload();
|
||||||
|
@ -2201,7 +2201,7 @@ class RouterTest extends CakeTestCase {
|
||||||
'plugins' => array(
|
'plugins' => array(
|
||||||
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
|
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
|
||||||
)
|
)
|
||||||
), true);
|
), App::RESET);
|
||||||
CakePlugin::load(array('TestPlugin', 'PluginJs'));
|
CakePlugin::load(array('TestPlugin', 'PluginJs'));
|
||||||
Router::reload();
|
Router::reload();
|
||||||
require CAKE . 'Config' . DS . 'routes.php';
|
require CAKE . 'Config' . DS . 'routes.php';
|
||||||
|
|
|
@ -656,7 +656,7 @@ class CakeTimeTest extends CakeTestCase {
|
||||||
public function testConvertSpecifiers() {
|
public function testConvertSpecifiers() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
|
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
Configure::write('Config.language', 'time_test');
|
Configure::write('Config.language', 'time_test');
|
||||||
$time = strtotime('Thu Jan 14 11:43:39 2010');
|
$time = strtotime('Thu Jan 14 11:43:39 2010');
|
||||||
|
|
||||||
|
@ -763,7 +763,7 @@ class CakeTimeTest extends CakeTestCase {
|
||||||
public function testI18nFormat() {
|
public function testI18nFormat() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
|
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
Configure::write('Config.language', 'time_test');
|
Configure::write('Config.language', 'time_test');
|
||||||
|
|
||||||
$time = strtotime('Thu Jan 14 13:59:28 2010');
|
$time = strtotime('Thu Jan 14 13:59:28 2010');
|
||||||
|
|
|
@ -85,7 +85,7 @@ class CacheHelperTest extends CakeTestCase {
|
||||||
Configure::write('Cache.disable', false);
|
Configure::write('Cache.disable', false);
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -92,13 +92,13 @@ class NumberHelperTest extends CakeTestCase {
|
||||||
public function testEngineOverride() {
|
public function testEngineOverride() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
|
'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
|
||||||
), APP::REGISTER);
|
), App::REGISTER);
|
||||||
$Number = new NumberHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
|
$Number = new NumberHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
|
||||||
$this->assertInstanceOf('TestAppEngine', $Number->engine());
|
$this->assertInstanceOf('TestAppEngine', $Number->engine());
|
||||||
|
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
));
|
));
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
$Number = new NumberHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
|
$Number = new NumberHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
|
||||||
$this->assertInstanceOf('TestPluginEngine', $Number->engine());
|
$this->assertInstanceOf('TestPluginEngine', $Number->engine());
|
||||||
|
|
|
@ -88,13 +88,13 @@ class TextHelperTest extends CakeTestCase {
|
||||||
public function testEngineOverride() {
|
public function testEngineOverride() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
|
'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
|
||||||
), APP::REGISTER);
|
), App::REGISTER);
|
||||||
$Text = new TextHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
|
$Text = new TextHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
|
||||||
$this->assertInstanceOf('TestAppEngine', $Text->engine());
|
$this->assertInstanceOf('TestAppEngine', $Text->engine());
|
||||||
|
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
));
|
));
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
$Text = new TextHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
|
$Text = new TextHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
|
||||||
$this->assertInstanceOf('TestPluginEngine', $Text->engine());
|
$this->assertInstanceOf('TestPluginEngine', $Text->engine());
|
||||||
|
|
|
@ -98,13 +98,13 @@ class TimeHelperTest extends CakeTestCase {
|
||||||
public function testEngineOverride() {
|
public function testEngineOverride() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
|
'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
|
||||||
), APP::REGISTER);
|
), App::REGISTER);
|
||||||
$Time = new TimeHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
|
$Time = new TimeHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
|
||||||
$this->assertInstanceOf('TestAppEngine', $Time->engine());
|
$this->assertInstanceOf('TestAppEngine', $Time->engine());
|
||||||
|
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
));
|
));
|
||||||
CakePlugin::load('TestPlugin');
|
CakePlugin::load('TestPlugin');
|
||||||
$Time = new TimeHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
|
$Time = new TimeHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
|
||||||
$this->assertInstanceOf('TestPluginEngine', $Time->engine());
|
$this->assertInstanceOf('TestPluginEngine', $Time->engine());
|
||||||
|
|
|
@ -271,7 +271,7 @@ class ViewTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
||||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
|
||||||
), true);
|
), App::RESET);
|
||||||
App::objects('plugins', null, false);
|
App::objects('plugins', null, false);
|
||||||
|
|
||||||
CakePlugin::load(array('TestPlugin', 'TestPlugin', 'PluginJs'));
|
CakePlugin::load(array('TestPlugin', 'TestPlugin', 'PluginJs'));
|
||||||
|
|
Loading…
Reference in a new issue