Ejemplo n.º 1
0
	/**
	 * start
	 *
	 * @access public
	 * @return void
	 */
	function start() {
		$this->Controller = new CookieComponentTestController();
		$this->Controller->constructClasses();
		$this->Controller->Component->initialize($this->Controller);
		$this->Controller->beforeFilter();
		$this->Controller->Component->startup($this->Controller);
		$this->Controller->Cookie->destroy();
	}
 /**
  * start
  *
  * @return void
  */
 public function setUp()
 {
     $_COOKIE = array();
     $this->Controller = new RememberMeComponentTestController(new CakeRequest(), new CakeResponse());
     $this->Controller->constructClasses();
     $this->RememberMe = $this->Controller->RememberMe;
     $this->RememberMe->Cookie = $this->getMock('CookieComponent', array(), array($this->Controller->Components));
     $this->RememberMe->Auth = $this->getMock('AuthComponent', array(), array($this->Controller->Components));
 }
Ejemplo n.º 3
0
 /**
  * start
  *
  * @return void
  */
 public function setUp()
 {
     $_COOKIE = array();
     Configure::write('Config.language', 'eng');
     $this->request = new CakeRequest();
     $this->Controller = new RememberMeComponentTestController($this->request, new CakeResponse());
     $this->Controller->constructClasses();
     $this->RememberMe = $this->Controller->RememberMe;
     $this->RememberMe->Cookie = $this->getMock('CookieComponent', array(), array($this->Controller->Components));
     $this->RememberMe->Auth = $this->getMock('AuthComponent', array(), array($this->Controller->Components));
     $this->RememberMe->request = $this->request;
 }
Ejemplo n.º 4
0
 /**
  * start
  *
  * @return void
  */
 public function setUp()
 {
     $_COOKIE = array();
     $this->Controller = new CookieComponentTestController(new CakeRequest(), new CakeResponse());
     $this->Controller->constructClasses();
     $this->Cookie = $this->Controller->Cookie;
     $this->Cookie->name = 'CakeTestCookie';
     $this->Cookie->time = 10;
     $this->Cookie->path = '/';
     $this->Cookie->domain = '';
     $this->Cookie->secure = false;
     $this->Cookie->key = 'somerandomhaskey';
     $this->Cookie->startup($this->Controller);
 }
Ejemplo n.º 5
0
 /**
  * init method
  *
  * @access protected
  * @return void
  */
 function _init()
 {
     $this->Controller = new PlateComponentTestController(array('components' => array('Auth', 'Plate', 'Plate')));
     $this->Controller->constructClasses();
     //$this->RequestHandler =& $this->Controller->RequestHandler;
     //$this->RequestHandler->initialize($this->Controller);
     $this->Controller->Plate->initialize($this->Controller);
     $this->Controller->beforeFilter();
     $this->Controller->Plate->startup($this->Controller);
 }