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


PHP MyCakeTestCase::setUp方法代碼示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     App::build(['Model' => [CakePlugin::path('Tools') . 'Test' . DS . 'test_app' . DS . 'Model' . DS]], App::RESET);
     $this->Comment = ClassRegistry::init('BitmaskedComment');
     $this->Comment->Behaviors->load('Tools.Bitmasked', ['mappedField' => 'statuses']);
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:BitmaskedBehaviorTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('Routing.prefixes', ['admin']);
     Router::reload();
     $this->Html = new HtmlExtHelper(new View(null));
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:HtmlExtHelperTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->CustomFinds = new CustomFindsBehavior();
     $this->Model = new CustomFindsTest();
     $this->Model->customFinds = array('topSellers' => array('fields' => array('Product.name', 'Product.price'), 'contain' => array('ProductImage.source'), 'conditions' => array('Product.countSeller >' => 20, 'Product.is_active' => 1), 'recursive' => 1));
 }
開發者ID:Jony01,項目名稱:LLD,代碼行數:7,代碼來源:CustomFindsBehaviorTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->ResetBehavior = new ResetBehavior();
     $this->Model = ClassRegistry::init('MyComment');
     $this->Model->Behaviors->load('Tools.Reset');
 }
開發者ID:Jony01,項目名稱:LLD,代碼行數:7,代碼來源:ResetBehaviorTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->KeyValueBehavior = new KeyValueBehavior();
     $this->Model = ClassRegistry::init('User');
     $this->Model->Behaviors->load('Tools.KeyValue');
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:KeyValueBehaviorTest.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::delete('Localization');
     $this->Model = ClassRegistry::init('PaymentMethod');
     $this->Model->Behaviors->load('Tools.DecimalInput', ['fields' => ['rel_rate', 'set_rate'], 'output' => true]);
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:DecimalInputBehaviorTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $this->Model = ClassRegistry::init('TestImap');
     $config = [];
     $this->Imap = new TestImapSource($config);
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:ImapSourceTest.php

示例8: setUp

 public function setUp()
 {
     $this->Model = ClassRegistry::init('Country');
     $this->db = ConnectionManager::getDataSource('test');
     $this->skipIf(!$this->db instanceof Mysql, 'The subquery test is only compatible with Mysql.');
     parent::setUp();
 }
開發者ID:Jony01,項目名稱:LLD,代碼行數:7,代碼來源:SubqueryTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     Router::reload();
     $this->View = new View();
     $this->Flash = new FlashHelper($this->View);
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:FlashHelperTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('Localization', array('decimals' => ',', 'thousands' => '.'));
     NumberLib::config();
     $this->Numeric = new NumericHelper(new View(null));
 }
開發者ID:Jony01,項目名稱:LLD,代碼行數:7,代碼來源:NumericHelperTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::delete('Localization');
     $this->Model = ClassRegistry::init('PaymentMethod');
     $this->Model->Behaviors->load('Tools.NumberFormat', array('fields' => array('rel_rate', 'set_rate'), 'output' => true));
 }
開發者ID:Jony01,項目名稱:LLD,代碼行數:7,代碼來源:NumberFormatBehaviorTest.php

示例12: setUp

 /**
  * SetUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::delete('Typography.locale');
     Configure::write('App.language', 'eng');
     $this->Typography = new TypographyHelper(new View(null));
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:12,代碼來源:TypographyHelperTest.php

示例13: setUp

 public function setUp()
 {
     $this->InlineCss = new InlineCssLib(['engine' => InlineCssLib::ENGINE_CSS_TO_INLINE]);
     $result = App::import('Vendor', 'Tools.CssToInlineStyles', ['file' => 'CssToInlineStyles' . DS . 'CssToInlineStyles.php']);
     $this->skipIf(!$result);
     parent::setUp();
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:InlineCssLibTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     //$this->skipIf(!file_exists(APP . 'Config' . DS . 'email.php'), 'no email.php');
     Configure::write('Email.live', false);
     $this->Email = new TestEmailLib();
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:EmailLibTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $this->Flattr = new FlattrHelper(new View(null));
     $this->Flattr->Html = new HtmlHelper(new View(null));
     $this->uid = '1234';
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:FlattrHelperTest.php


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