Permalink
Browse files

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

…session component.
  • Loading branch information...
1 parent ebf99de commit 540e81b1b0a33bf6fc3de2a1bbb279be16adce7c @markstory markstory committed Jan 14, 2010
@@ -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);
@@ -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);
@@ -150,7 +150,7 @@ class EmailTestController extends Controller {
* @var array
* @access public
*/
- var $components = array('EmailTest');
+ var $components = array('Session', 'EmailTest');
/**
* pageTitle property
@@ -60,7 +60,7 @@ class SecurityTestController extends Controller {
* @var array
* @access public
*/
- var $components = array('TestSecurity');
+ var $components = array('Session', 'TestSecurity');
/**
* failed property
@@ -1077,7 +1077,7 @@ function testMergeVarsNotGreedy() {
$Controller->uses = array();
$Controller->constructClasses();
- $this->assertTrue(isset($Controller->Session));
+ $this->assertFalse(isset($Controller->Session));
}
/**

0 comments on commit 540e81b

Please sign in to comment.