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


PHP ControllerTestCase::setUp方法代碼示例

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


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

示例1: 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

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $db = Zend_Registry::get('db');
     $this->projectMapper = new C3op_Projects_ProjectMapper($db);
     $this->projectsBeforeTests = $this->projectMapper->getAllIds();
 }
開發者ID:racporto,項目名稱:c3op,代碼行數:7,代碼來源:ProjectEdit.php

示例3: 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

示例4: setUp

 /** init tests */
 public function setUp()
 {
     $this->setupDatabase(array('default'));
     $this->_models = array('Community', 'User', 'Folder', 'Item', 'Folderpolicyuser', 'Itempolicyuser');
     $this->_daos = array();
     parent::setUp();
 }
開發者ID:josephsnyder,項目名稱:Midas,代碼行數:8,代碼來源:BrowseControllerTest.php

示例5: setUp

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

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->emptyCollectionRole = new Opus_CollectionRole();
     $this->emptyCollectionRole->setName("test1role");
     $this->emptyCollectionRole->setOaiName("test1role");
     $this->emptyCollectionRole->setDisplayBrowsing("Name");
     $this->emptyCollectionRole->setDisplayFrontdoor("Name");
     $this->emptyCollectionRole->setDisplayOai("Name");
     $this->emptyCollectionRole->setPosition(100);
     $this->emptyCollectionRole->store();
     $this->nonEmptyCollectionRole = new Opus_CollectionRole();
     $this->nonEmptyCollectionRole->setName("test2role");
     $this->nonEmptyCollectionRole->setOaiName("test2role");
     $this->nonEmptyCollectionRole->setDisplayBrowsing("Name");
     $this->nonEmptyCollectionRole->setDisplayFrontdoor("Name");
     $this->nonEmptyCollectionRole->setDisplayOai("Name");
     $this->nonEmptyCollectionRole->setPosition(101);
     $this->nonEmptyCollectionRole->store();
     $this->rootCollection = $this->nonEmptyCollectionRole->addRootCollection();
     $this->rootCollection->store();
     $this->collection = new Opus_Collection();
     $this->collection->setName("first collection");
     $this->collection->setNumber("123");
     $this->rootCollection->addFirstChild($this->collection);
     $this->collection->store();
     $this->anotherCollection = new Opus_Collection();
     $this->anotherCollection->setName("last collection");
     $this->anotherCollection->setNumber("987");
     $this->rootCollection->addLastChild($this->anotherCollection);
     $this->anotherCollection->store();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:32,代碼來源:CollectionControllerTest.php

示例7: setUp

 /** set up tests */
 public function setUp()
 {
     $this->setupDatabase(array('default', 'adminUser'));
     $this->_models = array('User', 'Item');
     $this->enabledModules = array('scheduler', 'remoteprocessing', 'api');
     parent::setUp();
 }
開發者ID:josephsnyder,項目名稱:Midas,代碼行數:8,代碼來源:ApiComponentControllerTest.php

示例8: setUp

 function setUp()
 {
     parent::setUp();
     $this->path = APPLICATION_PATH . "/../tests/fixtures/quiz1";
     $this->getFrontController()->setParam('xml_path', $this->path);
     //Override for our tests
 }
開發者ID:sutantyo,項目名稱:itec810,代碼行數:7,代碼來源:QuizSessionTest.php

示例9: setUp

 /** init tests */
 public function setUp()
 {
     $this->setupDatabase(array('default'));
     $this->_models = array('User', 'Community', 'Group', 'Feed', 'NewUserInvitation', 'PendingUser');
     $this->_daos = array('User');
     parent::setUp();
 }
開發者ID:josephsnyder,項目名稱:Midas,代碼行數:8,代碼來源:UserControllerTest.php

示例10: 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

示例11: 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

示例12: 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

示例13: setUp

 /**
  * startTest method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     // reset variables
     require dirname(dirname(dirname(dirname(dirname(__FILE__))))) . DS . 'Lil' . DS . 'Config' . DS . 'core.php';
     Configure::write('Lil.plugins', array('Crm', 'Invoices'));
 }
開發者ID:malamalca,項目名稱:lil-documents,代碼行數:12,代碼來源:InvoicesControllerTest.php

示例14: 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

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $this->model = new Admin_Model_FileImport();
     $this->importFolder = APPLICATION_PATH . '/tests/workspace/incoming';
     $this->_clearImportFolder();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:7,代碼來源:FileImportTest.php


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