コード例 #1
0
ファイル: TestCaseView.php プロジェクト: sporkcode/spork
 /**
  * Initialize View Model instance
  * 
  * @see \Spork\Test\TestCase\TestCaseDb::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     if (!$this->model instanceof ModelInterface) {
         $this->model = new $this->model();
     }
 }
コード例 #2
0
 /**
  * Setup resources for dispatching a controller action
  * 
  * @see \Spork\Test\TestCase\TestCaseDb::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $this->isConsole = Console::isConsole();
     Console::overrideIsConsole(false);
     $serviceManager = $this->getServiceManager();
     $this->params = array();
     $this->application = $serviceManager->get('application');
     $this->request = $serviceManager->get('request');
     $this->response = $serviceManager->get('response');
 }