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


PHP TestCase::setUp方法代碼示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     //Configure::write('App.namespace', 'TestApp');
     $this->Table = TableRegistry::get('Stories');
     $this->Table->addBehavior('Tools.Neighbor');
 }
開發者ID:alescx,項目名稱:cakephp-tools,代碼行數:7,代碼來源:NeighborBehaviorTest.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();
     Router::reload();
     $View = new View(null);
     $this->Common = new CommonHelper($View);
 }
開發者ID:dereuromark,項目名稱:cakephp-tools,代碼行數:10,代碼來源:CommonHelperTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('Localization', ['decimals' => ',', 'thousands' => '.']);
     Number::config('en_EN');
     $this->Number = new NumberHelper(new View(null));
 }
開發者ID:dereuromark,項目名稱:cakephp-tools,代碼行數:7,代碼來源:NumberHelperTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->Url = new UrlHelper(new View(null));
     $this->Url->request = new Request();
     $this->Url->request->webroot = '';
 }
開發者ID:alescx,項目名稱:cakephp-tools,代碼行數:7,代碼來源:UrlHelperTest.php

示例6: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->event = new Event('Controller.beforeFilter');
     $this->Controller = new UrlComponentTestController(new Request());
     Configure::write('App.fullBaseUrl', 'http://localhost');
 }
開發者ID:dereuromark,項目名稱:cakephp-tools,代碼行數:10,代碼來源:UrlComponentTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Table = TableRegistry::get('ResetComments');
     $this->Table->addBehavior('Tools.Reset');
 }
開發者ID:dereuromark,項目名稱:cakephp-tools,代碼行數:7,代碼來源:ResetBehaviorTest.php

示例8: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Router::reload();
     $View = new View(null);
     $this->Flash = new FlashHelper($View);
 }
開發者ID:alescx,項目名稱:cakephp-tools,代碼行數:10,代碼來源:FlashHelperTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Controller = new CommonComponentTestController(new Request('/test'));
     $this->Controller->startupProcess();
 }
開發者ID:repher,項目名稱:cakephp-tools,代碼行數:7,代碼來源:CommonComponentTest.php

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

示例11: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->request = $this->getMock('Cake\\Network\\Request', ['cookie']);
     $this->view = new View($this->request);
     $this->AuthUser = new AuthUserHelper($this->view);
 }
開發者ID:olmprakash,項目名稱:cakephp-tools,代碼行數:12,代碼來源:AuthUserHelperTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Controller = new Controller();
     $this->Controller->startupProcess();
 }
開發者ID:olmprakash,項目名稱:cakephp-tools,代碼行數:7,代碼來源:ControllerTest.php

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

示例14: setUp

 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $controller = new Controller(new Request());
     $this->ComponentRegistry = new ComponentRegistry($controller);
     $this->AuthUser = new AuthUserComponent($this->ComponentRegistry);
     $this->AuthUser->Auth = $this->getMock('Cake\\Controller\\Component\\AuthComponent', ['user'], [$this->ComponentRegistry]);
 }
開發者ID:olmprakash,項目名稱:cakephp-tools,代碼行數:13,代碼來源:AuthUserComponentTest.php

示例15: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->out = new ConsoleOutput();
     $this->err = new ConsoleOutput();
     $io = new ConsoleIo($this->out, $this->err);
     $this->Shell = $this->getMockBuilder(InflectShell::class)->setMethods(['in', '_stop'])->setConstructorArgs([$io])->getMock();
 }
開發者ID:dereuromark,項目名稱:cakephp-tools,代碼行數:11,代碼來源:InflectShellTest.php


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