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