当前位置: 首页>>代码示例>>PHP>>正文


PHP CakeTestCase::startTest方法代码示例

本文整理汇总了PHP中CakeTestCase::startTest方法的典型用法代码示例。如果您正苦于以下问题:PHP CakeTestCase::startTest方法的具体用法?PHP CakeTestCase::startTest怎么用?PHP CakeTestCase::startTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CakeTestCase的用法示例。


在下文中一共展示了CakeTestCase::startTest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: startTest

 /**
  * setUp
  *
  * @return void
  * @access public
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Session = ClassRegistry::init('SerializedSession');
     $this->Content = ClassRegistry::init('SerializedContent');
     $this->settings =& $this->Session->Behaviors->Serializable->settings;
 }
开发者ID:sh1omi,项目名称:xlrstats-web-v3,代码行数:13,代码来源:SerializableTest.php

示例2: startTest

 public function startTest($method)
 {
     parent::startTest($method);
     $this->path = App::pluginPath('upload') . 'tests' . DS . 'images' . DS;
     $this->source = $this->path . 'panda.jpg';
     $this->Resize = new Resize('php', $this->source);
 }
开发者ID:rodrigorm,项目名称:upload,代码行数:7,代码来源:resize.test.php

示例3: startTest

 public function startTest($method)
 {
     parent::startTest($method);
     $this->path = App::pluginPath('upload') . 'tests' . DS . 'images' . DS;
     $source = $this->path . 'panda.jpg';
     $this->ImageGd = new ImageGd($source);
 }
开发者ID:rodrigorm,项目名称:upload,代码行数:7,代码来源:image_gd.test.php

示例4: startTest

 /**
  * Start test
  *
  * @return void
  * @access public
  */
 public function startTest($method = null)
 {
     $path = APP . 'plugins' . DS . 'plugin_callbacks' . DS . 'tests' . DS . 'mock_app' . DS;
     App::import('Model', 'User', 'Model', array(), $path . 'plugins' . DS . 'my_custom_plugin' . DS . 'models' . DS . 'user.php');
     $this->MockedPluginModel =& ClassRegistry::init('User');
     $this->MockedPluginModel->Behaviors->attach('PluginCallbacks.Callbacks', compact('path'));
     parent::startTest($method);
 }
开发者ID:jadb,项目名称:cakephp-plugin-callbacks,代码行数:14,代码来源:callbacks.test.php

示例5: startTest

 public function startTest($method)
 {
     parent::startTest($method);
     $this->AdminCrud = new AdminCrudBehavior();
     $this->User = ClassRegistry::init('User');
     $fixture = new UserFixture();
     $this->record = array('User' => $fixture->records[0]);
 }
开发者ID:rodrigorm,项目名称:panel,代码行数:8,代码来源:AdminCrudBehaviorTest.php

示例6: startTest

 /**
  * Start Test
  *
  * @return void
  * @access public
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $request = new CakeRequest('contacts/add', false);
     $Controller = new Controller($request);
     $this->View = new View($Controller);
     $this->Cleaner = new CleanerHelper($this->View);
     $this->Cleaner->Html = new HtmlHelper($this->View);
 }
开发者ID:sh1omi,项目名称:xlrstats-web-v3,代码行数:15,代码来源:CleanerHelperTest.php

示例7: startTest

 /**
  * Start test callback
  * 
  * @param string $method Test being executed
  * @return void
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->BitlyApi = new MockBitlyApiBehavior();
     if ($this->__testWithMockApi) {
         Classregistry::removeObject('bitly_api_behavior');
         Classregistry::addObject('bitly_api_behavior', $this->BitlyApi);
     }
     $this->BitlyAccess = ClassRegistry::init('Bitly.BitlyAccess');
 }
开发者ID:CakeDC,项目名称:bitly,代码行数:16,代码来源:BitlyAccessTest.php

示例8: startTest

 /**
  * Start Test callback
  *
  * @param string $method
  * @return void
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Categories = AppMock::getTestController('I18nCategoriesController');
     $this->Categories->constructClasses();
     $this->Categories->Auth = new CategoriesControllerTestAuthComponent();
     $this->Categories->Category = $this->Categories->I18nCategory;
     $this->Categories->params = array('named' => array(), 'pass' => array(), 'url' => array());
     $fixture = new CategoryFixture();
     $this->record = array('I18nCategory' => $fixture->records[0]);
 }
开发者ID:jxav,项目名称:categories,代码行数:17,代码来源:I18nCategoriesControllerTest.php

示例9: startTest

 /**
  * Start test callback
  * 
  * @return void
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Http = new MockHttpSocket();
     ClassRegistry::removeObject('http_socket');
     if ($this->__useTestSocket) {
         ClassRegistry::addObject('http_socket', $this->Http);
     }
     if ($this->__useTestSocket) {
         Configure::write('Bitly', array('login' => 'testLogin', 'apiKey' => 'testApiKey'));
     }
     $this->Model = ClassRegistry::init('ModelTest');
     $this->BitlyApi = $this->Model->Behaviors->BitlyApi;
 }
开发者ID:CakeDC,项目名称:bitly,代码行数:19,代码来源:BitlyApiBehaviorTest.php

示例10: startTest

 /**
  * Start Test callback
  *
  * @param string $method
  * @return void
  * @access public
  */
 public function startTest($method)
 {
     parent::startTest($method);
     // STI models
     $this->Article = ClassRegistry::init('Article');
     $this->Page = ClassRegistry::init('Page');
     $this->Content = ClassRegistry::init('Content');
     $this->Page->Behaviors->attach('Containable');
     $this->Article->Behaviors->attach('Containable');
     // CTI models
     $this->Asset = ClassRegistry::init('Asset');
     $this->Link = ClassRegistry::init('Link');
     $this->Image = ClassRegistry::init('Image');
 }
开发者ID:rcaravita,项目名称:jodeljodel,代码行数:21,代码来源:inheritable.test.php

示例11: startTest

 public function startTest($method)
 {
     parent::startTest($method);
     $this->Upload = new UploadHelper();
     $this->Upload->Html = new HtmlHelper();
     $this->Controller =& new TestUploadHelperUploadController();
     $this->View =& new View($this->Controller);
     $this->TestUpload = ClassRegistry::init('TestUploadHelperUpload');
     $this->TestUser = ClassRegistry::init('TestUploadHelperTestUser');
     ClassRegistry::addObject('view', $this->View);
     ClassRegistry::addObject('Upload', new TestUploadHelperUpload());
     ClassRegistry::addObject('User', new TestUploadHelperTestUser());
     $this->record = array('Upload' => array('id' => 1, 'photo' => 'Photo.png', 'dir' => '1', 'type' => 'image/png', 'size' => 8192));
 }
开发者ID:rodrigorm,项目名称:upload,代码行数:14,代码来源:upload.test.php

示例12: startTest

 /**
  * Start test method
  *
  * @return void
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->CommentWidget = new CommentWidgetHelper();
     $this->CommentWidget->Form = new FormHelper();
     $this->CommentWidget->Html = new HtmlHelper();
     $this->Js = new JsHelper();
     $this->CommentWidget->Js = $this->Js;
     $this->CommentWidget->params['action'] = 'view';
     $this->Controller = ClassRegistry::init('ArticlesTestController');
     $this->View = new View($this->Controller);
     ClassRegistry::addObject('view', $this->View);
     if (!in_array($method, array('testInitialize', 'testOptions'))) {
         $this->CommentWidget->initialize();
     }
 }
开发者ID:hiltongoncalves,项目名称:Comments,代码行数:21,代码来源:comment_widget.test.php

示例13: startTest

 /**
  * (non-PHPdoc)
  * @see cake/tests/lib/CakeTestCase#startTest($method)
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Comments = new TestCommentsController(new CakeRequest());
     $this->Comments->params = array('named' => array(), 'pass' => array(), 'url' => array());
     $this->Comments->constructClasses();
 }
开发者ID:rodrigorm,项目名称:comments,代码行数:11,代码来源:CommentsControllerTest.php

示例14: startTest

 public function startTest($method = null)
 {
     parent::startTest($method);
     $this->__loadController();
     $_SERVER['REQUEST_METHOD'] = 'POST';
 }
开发者ID:42milez,项目名称:cakephp2-blog-tutorial,代码行数:6,代码来源:TransitionComponentTest.php

示例15: startTest

 /**
  *
  *
  * @param unknown $method
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Throttle = ClassRegistry::init('Icing.Throttle');
 }
开发者ID:beckye67,项目名称:Icing,代码行数:10,代码来源:ThrottleTest.php


注:本文中的CakeTestCase::startTest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。