當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。