Updating security component test case to use startTest and endTest

This commit is contained in:
Mark Story 2009-12-16 22:15:58 -05:00
parent dffff314e1
commit 3a6b29d042

View file

@ -143,7 +143,7 @@ class SecurityComponentTest extends CakeTestCase {
* @access public * @access public
* @return void * @return void
*/ */
function setUp() { function startTest() {
$this->Controller =& new SecurityTestController(); $this->Controller =& new SecurityTestController();
$this->Controller->Component->init($this->Controller); $this->Controller->Component->init($this->Controller);
$this->Controller->Security =& $this->Controller->TestSecurity; $this->Controller->Security =& $this->Controller->TestSecurity;
@ -158,7 +158,7 @@ class SecurityComponentTest extends CakeTestCase {
* @access public * @access public
* @return void * @return void
*/ */
function tearDown() { function endTest() {
Configure::write('Security.salt', $this->oldSalt); Configure::write('Security.salt', $this->oldSalt);
$this->Controller->Session->delete('_Token'); $this->Controller->Session->delete('_Token');
unset($this->Controller->Security); unset($this->Controller->Security);