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


PHP TestSuite\TestCase類代碼示例

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


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

示例1: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Comments = TableRegistry::get('BitmaskedComments');
     $this->Comments->addBehavior('Tools.Bitmasked', ['mappedField' => 'statuses']);
 }
開發者ID:dereuromark,項目名稱:cakephp-tools,代碼行數:10,代碼來源:BitmaskedBehaviorTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Comments = TableRegistry::get('JsonableComments');
     $this->Comments->addBehavior('Tools.Jsonable', ['fields' => ['details']]);
 }
開發者ID:repher,項目名稱:cakephp-tools,代碼行數:7,代碼來源:JsonableBehaviorTest.php

示例3: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::delete('FormConfig');
     $this->View = new View(null);
     $this->Form = new FormHelper($this->View);
 }
開發者ID:alescx,項目名稱:cakephp-tools,代碼行數:10,代碼來源:FormHelperTest.php

示例4: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Log::drop('email');
     Email::drop('test');
     Email::dropTransport('debug');
     Email::dropTransport('test_smtp');
 }
開發者ID:dereuromark,項目名稱:cakephp-tools,代碼行數:13,代碼來源:EmailTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->PostalCodes = TableRegistry::get('Data.PostalCodes');
     $entity = $this->PostalCodes->newEntity(['code' => '81222']);
     $this->assertEmpty($entity->errors());
     $result = $this->PostalCodes->save($entity);
     $this->assertNotEmpty($result);
 }
開發者ID:dereuromark,項目名稱:cakephp-data,代碼行數:9,代碼來源:PostalCodesTableTest.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     if ($this->isDebug()) {
         $this->CurrencyBitcoin = new CurrencyBitcoinLib();
         return;
     }
     $this->CurrencyBitcoin = $this->getMock('Data\\Lib\\CurrencyBitcoinLib', ['_get']);
     $this->path = Plugin::path('Data') . 'tests' . DS . 'test_files' . DS . 'json' . DS;
 }
開發者ID:dereuromark,項目名稱:cakephp-data,代碼行數:10,代碼來源:CurrencyBitcoinLibTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     if ($this->isDebug()) {
         $this->GeoImport = new GeoImportLib();
         return;
     }
     $this->GeoImport = $this->getMock('Data\\Lib\\GeoImportLib', ['_getFromUrl']);
     $this->path = Plugin::path('Data') . 'tests' . DS . 'test_files' . DS . 'html' . DS;
     // Liste-der-St-C3-A4dte-in-der-Schweiz-action-edit-section-4.html
     Cache::clear();
 }
開發者ID:dereuromark,項目名稱:cakephp-data,代碼行數:12,代碼來源:GeoImportLibTest.php

示例8: tearDown

 public function tearDown()
 {
     unset($this->Table);
     TableRegistry::clear();
     parent::tearDown();
 }
開發者ID:alescx,項目名稱:cakephp-tools,代碼行數:6,代碼來源:TreeHelperTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4';
 }
開發者ID:dereuromark,項目名稱:cakephp-tools,代碼行數:5,代碼來源:LanguageTest.php

示例10: tearDown

 public function tearDown()
 {
     parent::tearDown();
     unset($this->Controller);
 }
開發者ID:olmprakash,項目名稱:cakephp-tools,代碼行數:5,代碼來源:ControllerTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->Text = new Text();
 }
開發者ID:alescx,項目名稱:cakephp-tools,代碼行數:5,代碼來源:TextTest.php

示例12: tearDown

 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
 }
開發者ID:olmprakash,項目名稱:cakephp-tools,代碼行數:9,代碼來源:AuthUserHelperTest.php

示例13: setUp

 /**
  * SetUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Form = new ContactForm();
 }
開發者ID:alescx,項目名稱:cakephp-tools,代碼行數:11,代碼來源:ContactFormTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->MimeTypeHelper = new MimeTypeHelper(new View(null));
 }
開發者ID:dereuromark,項目名稱:cakephp-data,代碼行數:5,代碼來源:MimeTypeHelperTest.php

示例15: tearDown

 public function tearDown()
 {
     parent::tearDown();
     unset($this->Timeline);
 }
開發者ID:dereuromark,項目名稱:cakephp-tools,代碼行數:5,代碼來源:TimelineHelperTest.php


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