当前位置: 首页>>代码示例>>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;未经允许,请勿转载。