當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ControllerTestCase類代碼示例

本文整理匯總了PHP中ControllerTestCase的典型用法代碼示例。如果您正苦於以下問題:PHP ControllerTestCase類的具體用法?PHP ControllerTestCase怎麽用?PHP ControllerTestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ControllerTestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tearDown

 protected function tearDown()
 {
     if ($this->count()) {
         ControllerTestCase::migrationDown('subscriptions');
         ControllerTestCase::migrationDown('payments');
     }
 }
開發者ID:shahmaulik,項目名稱:zfcore,代碼行數:7,代碼來源:Test.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->test = new DiamondController(new Diamond());
     $this->setupLayout($this->test);
     $this->layout = $this->getLayout($this->test);
 }
開發者ID:viniciusferreira,項目名稱:daily,代碼行數:7,代碼來源:DiamondControllerTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_gateway = new Users_Model_UserGateway();
     $this->_installModule('pages');
     $this->_installModule('users');
 }
開發者ID:rantoine,項目名稱:AdvisorIllustrator,代碼行數:7,代碼來源:CreateControllerTest.php

示例4: setUp

 /** Initialize tests */
 public function setUp()
 {
     $this->enabledModules = array('javauploaddownload');
     $this->_daos = array('Item');
     $this->_models = array('Item', 'User');
     parent::setUp();
 }
開發者ID:josephsnyder,項目名稱:Midas,代碼行數:8,代碼來源:DownloadControllerTest.php

示例5: setUp

 /**
  * setUp
  *
  * @author   Jun Nishikawa <topaz2@m0n0m0n0.com>
  * @return   void
  */
 public function setUp()
 {
     Configure::write('debug', 0);
     parent::setUp();
     $this->InstallController = $this->generate('Install.Install', array('components' => array('Session')));
     $this->controller->plugin = 'Install';
 }
開發者ID:Onasusweb,項目名稱:Install,代碼行數:13,代碼來源:InstallControllerPostgresqlPostInitTest.php

示例6: tearDown

 function tearDown()
 {
     Cache::clear(false, 'default');
     ConnectionManager::drop('cacher');
     unset($this->CacheData);
     parent::tearDown();
 }
開發者ID:jeremyharris,項目名稱:cacher,代碼行數:7,代碼來源:CacheBehaviorTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_db = Zend_Registry::get('db');
     $this->_str = 'notes @content 12:01 dfsa 1:00 df 10:01 badtime12:01 num1234';
     $this->_input = new Lds_Helper_MainInput($this->_str);
 }
開發者ID:sandin,項目名稱:iMemo,代碼行數:7,代碼來源:MainInputTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->Admin = ClassRegistry::init('Admin');
     $this->UsersController = new UsersController();
     $this->UsersController->constructClasses();
 }
開發者ID:MrGrigorev,項目名稱:reserva-de-salas,代碼行數:7,代碼來源:UsersControllerTest.php

示例9: setUp

 public function setUp()
 {
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     parent::setUp();
     $this->ProductCredit = ClassRegistry::init('ProductCredit');
     //$this->OrdersController->startup($this->Controller);
 }
開發者ID:kameshwariv,項目名稱:testexample,代碼行數:7,代碼來源:MarchKudosUKTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $this->helper = Zend_Controller_Action_HelperBroker::getStaticHelper('breadcrumbs');
     $this->navigation = Zend_Registry::get('Opus_View')->navigation();
     $this->helper->setNavigation($this->navigation);
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:7,代碼來源:BreadcrumbsTest.php

示例11: tearDown

 public function tearDown()
 {
     if ($this->createsModels) {
         $this->deleteNewModels();
     }
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:7,代碼來源:CrudControllerTestCase.php

示例12: tearDown

 protected function tearDown()
 {
     if (!is_null($this->config)) {
         Zend_Registry::set('Zend_Config', $this->config);
     }
     // Cleanup of Log File
     $config = Zend_Registry::get('Zend_Config');
     $filename = $config->workspacePath . DIRECTORY_SEPARATOR . 'log' . DIRECTORY_SEPARATOR . 'opus_consistency-check.log';
     if (file_exists($filename)) {
         unlink($filename);
     }
     // Cleanup of Lock File
     if (file_exists($filename . '.lock')) {
         unlink($filename . '.lock');
     }
     // Cleanup of Jobs Table
     $jobs = Opus_Job::getByLabels(array(Opus_Job_Worker_ConsistencyCheck::LABEL));
     foreach ($jobs as $job) {
         try {
             $job->delete();
         } catch (Exception $e) {
             // ignore
         }
     }
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:26,代碼來源:IndexMaintenanceTest.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $this->test = new BowlingGameController(new BowlingGame());
     $this->setupLayout($this->test);
     $this->layout = $this->getLayout($this->test);
 }
開發者ID:viniciusferreira,項目名稱:daily,代碼行數:7,代碼來源:BowlingGameControllerTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->_validator = new Application_Form_Validate_AtLeastOneNotEmpty();
     $this->_validator->addElement('name');
     $this->_validator->addElement('number');
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:7,代碼來源:AtLeastOneNotEmptyTest.php

示例15: tearDown

 public function tearDown()
 {
     foreach ($this->localTestFiles as $file) {
         unlink($this->folder . '/' . $file);
     }
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:7,代碼來源:FilesTest.php


注:本文中的ControllerTestCase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。