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


PHP MyCakeTestCase類代碼示例

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


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

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

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

示例3: setUp

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

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

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

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

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

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

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $this->MultipleDisplayFieldsBehavior = new MultipleDisplayFieldsBehavior();
     $this->Comment = ClassRegistry::init('Comment');
     $this->Comment->bindModel(['belongsTo' => ['User']], false);
     $this->Comment->displayField = 'comment';
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:8,代碼來源:MultipleDisplayFieldsBehaviorTest.php

示例10: setUp

 /**
  * PwdShellTest::setUp()
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $output = new TestConsoleOutput();
     $error = $this->getMock('ConsoleOutput', array(), array(), '', false);
     $input = $this->getMock('ConsoleInput', array(), array(), '', false);
     $this->PwdShell = new PwdShell($output, $error, $input);
 }
開發者ID:Jony01,項目名稱:LLD,代碼行數:13,代碼來源:PwdShellTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     if ($this->isDebug()) {
         Configure::write('Hazard.debug', true);
     }
     $this->HazardLib = new TestHazardLib();
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:8,代碼來源:HazardLibTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $this->NamedScopeBehavior = new NamedScopeBehavior();
     $this->Comment = ClassRegistry::init('Comment');
     $this->Comment->bindModel(array('belongsTo' => array('User')), false);
     $this->Comment->displayField = 'comment';
     $this->Comment->Behaviors->load('Tools.NamedScope');
     $this->Comment->User->Behaviors->load('Tools.NamedScope');
 }
開發者ID:Jony01,項目名稱:LLD,代碼行數:10,代碼來源:NamedScopeBehaviorTest.php

示例13: tearDown

 public function tearDown()
 {
     $this->ZipLib->close();
     foreach ($this->testFiles as $file => $content) {
         unlink(TMP . $file);
     }
     $this->_rrmdir(TMP . 'xyz');
     $this->_rrmdir(TMP . 'xyz2');
     parent::tearDown();
 }
開發者ID:Jony01,項目名稱:LLD,代碼行數:10,代碼來源:ZipLibTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $output = new TestConsoleOutput();
     $error = $this->getMock('ConsoleOutput', [], [], '', false);
     $input = $this->getMock('ConsoleInput', [], [], '', false);
     $this->EncodingShell = new TestEncodingShell($output, $error, $input);
     $this->EncodingShell->initialize();
     $this->EncodingShell->startup();
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:10,代碼來源:EncodingShellTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     if ($this->isDebug()) {
         $this->skipIf(!Configure::read('Mailchimp.apiKey'), 'No API key');
     } else {
         Configure::write('Mailchimp.apiKey', 'foo-bar');
     }
     $this->MailchimpAppModel = new MailchimpAppModel();
 }
開發者ID:drmonkeyninja,項目名稱:cakephp-mailchimp,代碼行數:10,代碼來源:MailchimpAppModelTest.php


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