Пример #1
0
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     if (!CakePlugin::loaded('DebugKit')) {
         try {
             CakePlugin::load('DebugKit');
         } catch (MissingPluginException $e) {
             $this->markTestSkipped('DebugKit plugin not available');
         }
     }
     $this->Controller = new Controller();
     $this->Panel = new CrudPanel();
     $this->setReflectionClassInstance($this->Panel);
 }
Пример #2
0
 public function setUp()
 {
     parent::setUp();
     $this->Request = $this->getMock('CakeRequest');
     $this->Collection = $this->getMock('ComponentCollection', null);
     $this->Controller = $this->getMock('Controller');
     $this->Controller->Components = $this->Collection;
     $this->Crud = $this->getMock('CrudComponent', null, array($this->Collection));
     $this->Model = $this->getMock('Model');
     $this->Model->name = '';
     $this->action = 'add';
     $this->Subject = new CrudSubject(array('request' => $this->Request, 'crud' => $this->Crud, 'controller' => $this->Controller, 'action' => $this->action, 'model' => $this->Model, 'modelClass' => '', 'args' => array()));
     $this->actionClassName = $this->getMockClass('CrudAction', array('_handle'));
     $this->ActionClass = new $this->actionClassName($this->Subject);
     $this->_configureAction($this->ActionClass);
 }
 public function setUp()
 {
     parent::setUp();
     $this->_config = Configure::read();
 }