コード例 #1
0
 public function setUp()
 {
     $this->setController('language');
     parent::setUp();
 }
コード例 #2
0
 public function setUp()
 {
     $this->setController('dnbinstitute');
     parent::setUp();
 }
コード例 #3
0
 public function setUp()
 {
     $this->setController('enrichmentkey');
     parent::setUp();
 }
コード例 #4
0
 public function setUp()
 {
     $this->setController('series');
     parent::setUp();
 }
コード例 #5
0
 /**
  * setUp
  *
  * Setup the classes the crud component needs to be testable
  */
 public function setUp()
 {
     require_once 'models.php';
     parent::setUp();
     CakeEventManager::instance(new TestCrudEventManager());
     ConnectionManager::getDataSource('test')->getLog();
     $this->model = new CrudExample();
     $this->controller = $this->getMock('CrudExamplesController', array('header', 'redirect', 'render', '_stop'), array(), '', false);
     $this->controller->name = 'CrudExamples';
     $this->request = $this->getMock('CakeRequest', array('is', 'method'));
     $this->request->expects($this->any())->method('is')->will($this->returnValue(true));
     $response = new CakeResponse();
     $this->controller->__construct($this->request, $response);
     $this->controller->methods = array();
     $this->Collection = new ComponentCollection();
     $this->Collection->init($this->controller);
     $this->controller->Components = $this->Collection;
     $settings = array('actions' => array('index', 'add', 'edit', 'view', 'delete'));
     $this->Crud = new TestCrudComponent($this->Collection, $settings);
     $this->Crud->initialize($this->controller);
     $this->controller->Crud = $this->Crud;
 }