Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use App::RESET instead of true with App::build()

  • Loading branch information...
commit c4829dc3b86bda5bd501bef0881ad08d80e8de8b 1 parent 6684b77
Kyle Robinson Young shama authored
Showing with 42 additions and 40 deletions.
  1. +3 −3 lib/Cake/Test/Case/Cache/CacheTest.php
  2. +1 −1  lib/Cake/Test/Case/Configure/PhpReaderTest.php
  3. +1 −1  lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
  4. +1 −1  lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
  5. +1 −1  lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
  6. +1 −1  lib/Cake/Test/Case/Console/ShellDispatcherTest.php
  7. +1 −1  lib/Cake/Test/Case/Console/ShellTest.php
  8. +1 −1  lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticateTest.php
  9. +2 −2 lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
  10. +1 −1  lib/Cake/Test/Case/Controller/ControllerTest.php
  11. +1 −1  lib/Cake/Test/Case/Core/CakePluginTest.php
  12. +3 −1 lib/Cake/Test/Case/Core/ConfigureTest.php
  13. +3 −3 lib/Cake/Test/Case/Core/ObjectTest.php
  14. +2 −2 lib/Cake/Test/Case/Error/ErrorHandlerTest.php
  15. +1 −1  lib/Cake/Test/Case/Error/ExceptionRendererTest.php
  16. +1 −1  lib/Cake/Test/Case/I18n/I18nTest.php
  17. +1 −1  lib/Cake/Test/Case/Log/CakeLogTest.php
  18. +2 −2 lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php
  19. +3 −3 lib/Cake/Test/Case/Routing/DispatcherTest.php
  20. +2 −2 lib/Cake/Test/Case/Routing/RouterTest.php
  21. +2 −2 lib/Cake/Test/Case/Utility/CakeTimeTest.php
  22. +1 −1  lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
  23. +2 −2 lib/Cake/Test/Case/View/Helper/NumberHelperTest.php
  24. +2 −2 lib/Cake/Test/Case/View/Helper/TextHelperTest.php
  25. +2 −2 lib/Cake/Test/Case/View/Helper/TimeHelperTest.php
  26. +1 −1  lib/Cake/Test/Case/View/ViewTest.php
6 lib/Cake/Test/Case/Cache/CacheTest.php
View
@@ -88,7 +88,7 @@ public function testConfigWithLibAndPluginEngines() {
App::build(array(
'Lib' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
$settings = array('engine' => 'TestAppCache', 'path' => TMP, 'prefix' => 'cake_test_');
@@ -260,7 +260,7 @@ public function testDrop() {
App::build(array(
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
$result = Cache::drop('some_config_that_does_not_exist');
$this->assertFalse($result);
@@ -312,7 +312,7 @@ public function testWriteTriggerError() {
App::build(array(
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
Cache::config('test_trigger', array('engine' => 'TestAppCache', 'prefix' => ''));
try {
2  lib/Cake/Test/Case/Configure/PhpReaderTest.php
View
@@ -85,7 +85,7 @@ public function testReadWithDots() {
public function testReadPluginValue() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
$reader = new PhpReader($this->path);
$result = $reader->read('TestPlugin.load');
2  lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
View
@@ -46,7 +46,7 @@ public function setUp() {
'Console/Command' => array(
CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
)
- ), true);
+ ), App::RESET);
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$out = new TestStringOutput();
2  lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
View
@@ -336,7 +336,7 @@ public function testGenerateOverwrite() {
public function testGenerateWithPlugins() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
$this->db->cacheSources = false;
2  lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
View
@@ -573,7 +573,7 @@ public function testInteractiveWithPlugin() {
$testApp = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS;
App::build(array(
'plugins' => array($testApp)
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
$this->Task->plugin = 'TestPlugin';
2  lib/Cake/Test/Case/Console/ShellDispatcherTest.php
View
@@ -119,7 +119,7 @@ public function setUp() {
'Console/Command' => array(
CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
)
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
}
2  lib/Cake/Test/Case/Console/ShellTest.php
View
@@ -173,7 +173,7 @@ public function testInitialize() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
$this->Shell->uses = array('TestPlugin.TestPluginPost');
2  lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticateTest.php
View
@@ -160,7 +160,7 @@ public function testPluginModel() {
Cache::delete('object_map', '_cake_core_');
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
$ts = date('Y-m-d H:i:s');
4 lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
View
@@ -712,7 +712,7 @@ public function testClientProperties() {
public function testAjaxRedirectAsRequestAction() {
App::build(array(
'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->request = $this->getMock('CakeRequest');
@@ -741,7 +741,7 @@ public function testAjaxRedirectAsRequestAction() {
public function testAjaxRedirectAsRequestActionStillRenderingLayout() {
App::build(array(
'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->request = $this->getMock('CakeRequest');
2  lib/Cake/Test/Case/Controller/ControllerTest.php
View
@@ -624,7 +624,7 @@ public function testControllerSet() {
public function testRender() {
App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
- ), true);
+ ), App::RESET);
ClassRegistry::flush();
$request = new CakeRequest('controller_posts/index');
$request->params['action'] = 'index';
2  lib/Cake/Test/Case/Core/CakePluginTest.php
View
@@ -33,7 +33,7 @@ class CakePluginTest extends CakeTestCase {
public function setUp() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
App::objects('plugins', null, false);
}
4 lib/Cake/Test/Case/Core/ConfigureTest.php
View
@@ -255,7 +255,9 @@ public function testLoadNoMerge() {
* @return void
*/
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());
CakePlugin::load('TestPlugin');
$result = Configure::load('TestPlugin.load', 'test');
6 lib/Cake/Test/Case/Core/ObjectTest.php
View
@@ -449,7 +449,7 @@ public function testRequestAction() {
'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS)
- ), true);
+ ), App::RESET);
$this->assertNull(Router::getRequest(), 'request stack should be empty.');
$result = $this->object->requestAction('');
@@ -489,7 +489,7 @@ public function testRequestAction() {
public function testRequestActionPlugins() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
Router::reload();
@@ -529,7 +529,7 @@ public function testRequestActionArray() {
'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS)
- ), true);
+ ), App::RESET);
CakePlugin::load(array('TestPlugin'));
$result = $this->object->requestAction(
4 lib/Cake/Test/Case/Error/ErrorHandlerTest.php
View
@@ -41,7 +41,7 @@ public function setUp() {
'View' => array(
CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
)
- ), true);
+ ), App::RESET);
Router::reload();
$request = new CakeRequest(null, false);
@@ -232,7 +232,7 @@ public function testLoadPluginHanlder() {
'plugins' => array(
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
)
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
Configure::write('Exception.renderer', 'TestPlugin.TestPluginExceptionRenderer');
$error = new NotFoundException('Kaboom!');
2  lib/Cake/Test/Case/Error/ExceptionRendererTest.php
View
@@ -155,7 +155,7 @@ public function setUp() {
'views' => array(
CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
)
- ), true);
+ ), App::RESET);
Router::reload();
$request = new CakeRequest(null, false);
2  lib/Cake/Test/Case/I18n/I18nTest.php
View
@@ -35,7 +35,7 @@ public function setUp() {
App::build(array(
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
CakePlugin::load(array('TestPlugin'));
}
2  lib/Cake/Test/Case/Log/CakeLogTest.php
View
@@ -49,7 +49,7 @@ public function testImportingLoggers() {
App::build(array(
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
$result = CakeLog::config('libtest', array(
4 lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php
View
@@ -504,7 +504,7 @@ public function testUsingAppLibsHandler() {
CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS
),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
Configure::write('Session', array(
'defaults' => 'cake',
'handler' => array(
@@ -525,7 +525,7 @@ public function testUsingAppLibsHandler() {
public function testUsingPluginHandler() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
CakePlugin::load('TestPlugin');
Configure::write('Session', array(
6 lib/Cake/Test/Case/Routing/DispatcherTest.php
View
@@ -1038,7 +1038,7 @@ public function testPluginShortCutUrlsWithControllerThatNeedsToBeLoaded() {
Router::reload();
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), true);
+ ), App::RESET);
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$Dispatcher = new TestDispatcher();
@@ -1114,7 +1114,7 @@ public function testTestPluginDispatch() {
$Dispatcher = new TestDispatcher();
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ), APP::RESET);
+ ), App::RESET);
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
Router::reload();
Router::parse('/');
@@ -1396,7 +1396,7 @@ public function testFullPageCachingDispatch($url) {
App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
- ), true);
+ ), App::RESET);
$dispatcher = new TestDispatcher();
$request = new CakeRequest($url);
4 lib/Cake/Test/Case/Routing/RouterTest.php
View
@@ -1187,7 +1187,7 @@ public function testPrefixRoutingAndPlugins() {
'plugins' => array(
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
)
- ), true);
+ ), App::RESET);
CakePlugin::load(array('TestPlugin'));
Router::reload();
@@ -2201,7 +2201,7 @@ public function testConnectDefaultRoutes() {
'plugins' => array(
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
)
- ), true);
+ ), App::RESET);
CakePlugin::load(array('TestPlugin', 'PluginJs'));
Router::reload();
require CAKE . 'Config' . DS . 'routes.php';
4 lib/Cake/Test/Case/Utility/CakeTimeTest.php
View
@@ -656,7 +656,7 @@ public function testFromString() {
public function testConvertSpecifiers() {
App::build(array(
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
- ), true);
+ ), App::RESET);
Configure::write('Config.language', 'time_test');
$time = strtotime('Thu Jan 14 11:43:39 2010');
@@ -763,7 +763,7 @@ public function testConvertPercentE() {
public function testI18nFormat() {
App::build(array(
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
- ), true);
+ ), App::RESET);
Configure::write('Config.language', 'time_test');
$time = strtotime('Thu Jan 14 13:59:28 2010');
2  lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
View
@@ -85,7 +85,7 @@ public function setUp() {
Configure::write('Cache.disable', false);
App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
- ), true);
+ ), App::RESET);
}
/**
4 lib/Cake/Test/Case/View/Helper/NumberHelperTest.php
View
@@ -92,13 +92,13 @@ public function testNumberHelperProxyMethodCalls() {
public function testEngineOverride() {
App::build(array(
'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
- ), APP::REGISTER);
+ ), App::REGISTER);
$Number = new NumberHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
$this->assertInstanceOf('TestAppEngine', $Number->engine());
App::build(array(
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ));
+ ));
CakePlugin::load('TestPlugin');
$Number = new NumberHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
$this->assertInstanceOf('TestPluginEngine', $Number->engine());
4 lib/Cake/Test/Case/View/Helper/TextHelperTest.php
View
@@ -88,13 +88,13 @@ public function testTextHelperProxyMethodCalls() {
public function testEngineOverride() {
App::build(array(
'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
- ), APP::REGISTER);
+ ), App::REGISTER);
$Text = new TextHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
$this->assertInstanceOf('TestAppEngine', $Text->engine());
App::build(array(
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ));
+ ));
CakePlugin::load('TestPlugin');
$Text = new TextHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
$this->assertInstanceOf('TestPluginEngine', $Text->engine());
4 lib/Cake/Test/Case/View/Helper/TimeHelperTest.php
View
@@ -98,13 +98,13 @@ public function testTimeHelperProxyMethodCalls() {
public function testEngineOverride() {
App::build(array(
'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
- ), APP::REGISTER);
+ ), App::REGISTER);
$Time = new TimeHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
$this->assertInstanceOf('TestAppEngine', $Time->engine());
App::build(array(
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
- ));
+ ));
CakePlugin::load('TestPlugin');
$Time = new TimeHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
$this->assertInstanceOf('TestPluginEngine', $Time->engine());
2  lib/Cake/Test/Case/View/ViewTest.php
View
@@ -271,7 +271,7 @@ public function setUp() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
- ), true);
+ ), App::RESET);
App::objects('plugins', null, false);
CakePlugin::load(array('TestPlugin', 'TestPlugin', 'PluginJs'));
Please sign in to comment.
Something went wrong with that request. Please try again.