/**
  * Verify that isAjax is set on the request params for ajax requests
  *
  * @return void
  * @triggers Controller.startup $this->Controller
  */
 public function testIsAjaxParams()
 {
     $this->request->env('HTTP_X_REQUESTED_WITH', 'XMLHttpRequest');
     $event = new Event('Controller.startup', $this->Controller);
     $this->RequestHandler->initialize([]);
     $this->Controller->beforeFilter($event);
     $this->RequestHandler->startup($event);
     $this->assertEquals(true, $this->Controller->request->params['isAjax']);
 }
 /**
  * testDisabling method
  *
  * @return void
  */
 public function testDisabling()
 {
     $_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
     $this->_init();
     $event = new Event('Controller.startup', $this->Controller);
     $this->RequestHandler->initialize($event);
     $this->Controller->beforeFilter($event);
     $this->RequestHandler->startup($event);
     $this->assertEquals(true, $this->Controller->request->params['isAjax']);
 }