Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing component and controller test cases to work with less magical …

…session component.
  • Loading branch information...
commit 540e81b1b0a33bf6fc3de2a1bbb279be16adce7c 1 parent ebf99de
@markstory markstory authored
View
2  cake/tests/cases/libs/controller/component.test.php
@@ -452,7 +452,7 @@ function testComponentsWithParams() {
$this->assertTrue(is_a($Controller->ParamTest, 'ParamTestComponent'));
$this->assertTrue(is_a($Controller->ParamTest->Banana, 'BananaComponent'));
$this->assertTrue(is_a($Controller->Orange, 'OrangeComponent'));
- $this->assertTrue(is_a($Controller->Session, 'SessionComponent'));
+ $this->assertFalse(isset($Controller->Session));
$this->assertEqual($Controller->Orange->settings, array('colour' => 'blood orange'));
$this->assertEqual($Controller->ParamTest->test, 'value');
$this->assertEqual($Controller->ParamTest->flag, true);
View
8 cake/tests/cases/libs/controller/components/auth.test.php
@@ -237,7 +237,7 @@ class AuthTestController extends Controller {
* @var array
* @access public
*/
- var $components = array('Auth', 'Acl');
+ var $components = array('Session', 'Auth', 'Acl');
/**
* testUrl property
@@ -382,7 +382,7 @@ class AjaxAuthController extends Controller {
* @var array
* @access public
*/
- var $components = array('TestAuth');
+ var $components = array('Session', 'TestAuth');
/**
* uses property
@@ -514,6 +514,7 @@ function endTest() {
$_ENV = $this->_env;
Configure::write('Acl', $this->_acl);
Configure::write('Security.salt', $this->_securitySalt);
+
$this->Controller->Session->delete('Auth');
$this->Controller->Session->delete('Message.auth');
ClassRegistry::flush();
@@ -1539,7 +1540,8 @@ function testComponentSettings() {
'loginAction' => array('controller' => 'people', 'action' => 'login'),
'userModel' => 'AuthUserCustomField',
'sessionKey' => 'AltAuth.AuthUserCustomField'
- )
+ ),
+ 'Session'
);
$this->Controller->Component->init($this->Controller);
$this->Controller->Component->initialize($this->Controller);
View
2  cake/tests/cases/libs/controller/components/email.test.php
@@ -150,7 +150,7 @@ class EmailTestController extends Controller {
* @var array
* @access public
*/
- var $components = array('EmailTest');
+ var $components = array('Session', 'EmailTest');
/**
* pageTitle property
View
2  cake/tests/cases/libs/controller/components/security.test.php
@@ -60,7 +60,7 @@ class SecurityTestController extends Controller {
* @var array
* @access public
*/
- var $components = array('TestSecurity');
+ var $components = array('Session', 'TestSecurity');
/**
* failed property
View
2  cake/tests/cases/libs/controller/controller.test.php
@@ -1077,7 +1077,7 @@ function testMergeVarsNotGreedy() {
$Controller->uses = array();
$Controller->constructClasses();
- $this->assertTrue(isset($Controller->Session));
+ $this->assertFalse(isset($Controller->Session));
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.