コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
ファイル: resize.test.php プロジェクト: rodrigorm/upload
 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);
 }
コード例 #3
0
ファイル: image_gd.test.php プロジェクト: rodrigorm/upload
 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);
 }
コード例 #4
0
 /**
  * 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);
 }
コード例 #5
0
 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]);
 }
コード例 #6
0
 /**
  * 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);
 }
コード例 #7
0
ファイル: BitlyAccessTest.php プロジェクト: CakeDC/bitly
 /**
  * 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');
 }
コード例 #8
0
 /**
  * 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]);
 }
コード例 #9
0
ファイル: BitlyApiBehaviorTest.php プロジェクト: CakeDC/bitly
 /**
  * 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;
 }
コード例 #10
0
 /**
  * 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');
 }
コード例 #11
0
ファイル: upload.test.php プロジェクト: rodrigorm/upload
 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));
 }
コード例 #12
0
 /**
  * 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();
     }
 }
コード例 #13
0
 /**
  * (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();
 }
コード例 #14
0
 public function startTest($method = null)
 {
     parent::startTest($method);
     $this->__loadController();
     $_SERVER['REQUEST_METHOD'] = 'POST';
 }
コード例 #15
0
ファイル: ThrottleTest.php プロジェクト: beckye67/Icing
 /**
  *
  *
  * @param unknown $method
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Throttle = ClassRegistry::init('Icing.Throttle');
 }
コード例 #16
0
 function startTest($method = null)
 {
     parent::startTest($method);
 }
コード例 #17
0
 /**
  * Start test method
  *
  * @return void
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Controller = ClassRegistry::init('ArticlesTestController');
     $this->View = $this->getMock('View', array('element'), array(new Controller()));
     $this->CommentWidget = new CommentWidgetHelper($this->View);
     $this->CommentWidget->Form = new FormHelper($this->View);
     $this->CommentWidget->Html = new HtmlHelper($this->View);
     $this->Js = $this->getMock('AppHelper', array('link', 'get', 'effect'), array($this->View));
     $this->CommentWidget->Js = $this->Js;
     $this->CommentWidget->request->params['action'] = 'view';
     if (!in_array($method, array('testInitialize', 'testOptions'))) {
         $this->CommentWidget->initialize();
     }
 }
コード例 #18
0
 function startTest($method = null)
 {
     $this->_loadController();
     parent::startTest($method);
 }
コード例 #19
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->logMethodCall(__FUNCTION__);
 }
コード例 #20
0
 /**
  * startTest method
  *
  * @param mixed $method
  * @access public
  * @return void
  */
 function startTest($method)
 {
     parent::startTest($method);
     $this->_initDb();
 }
コード例 #21
0
ファイル: form.test.php プロジェクト: kaz0636/openflp
 function startTest($method)
 {
     parent::startTest($method);
     $this->Form =& new FormHelper();
     $this->Form->Html =& new HtmlHelper();
     $this->Controller =& new ContactTestController();
     $this->View =& new View($this->Controller);
 }
コード例 #22
0
ファイル: soft_deletable.test.php プロジェクト: rchick/syrup
 public function startTest($method)
 {
     parent::startTest($method);
     $this->DeletableArticle = ClassRegistry::init('DeletableArticle');
 }
コード例 #23
0
ファイル: LoggerTest.php プロジェクト: radig/auditable
 public function startTest($method)
 {
     parent::startTest($method);
     $this->skipIf(is_a($this->Logger->getDataSource(), 'MongodbSource'), 'Está versão do Plugin não suporta MongodbSource. Tente o AuditableMongoLogger.');
 }
コード例 #24
0
ファイル: select_options.test.php プロジェクト: styfle/core
 public function startTest($method)
 {
     parent::startTest($method);
     $this->SelectOptions = new SelectOptionsHelper();
 }
コード例 #25
0
ファイル: core_test_case.php プロジェクト: styfle/core
 /**
  * Runs prior to running the test method
  *
  * @param string $method The test method
  * @return void
  */
 public function startTest($method)
 {
     parent::startTest($method);
     Router::reload();
 }
コード例 #26
0
ファイル: sluggable.test.php プロジェクト: rchick/syrup
 public function startTest($action)
 {
     parent::startTest($action);
     $this->SlugArticle = ClassRegistry::init('SlugArticle');
 }
コード例 #27
0
ファイル: RatingTest.php プロジェクト: jxav/ratings
 /**
  * Start Test callback
  *
  * @param string $method
  * @return void
  */
 public function startTest($method)
 {
     Configure::write('App.UserClass', null);
     parent::startTest($method);
     $this->Rating = ClassRegistry::init('Ratings.Rating');
 }
コード例 #28
0
ファイル: cacheable.test.php プロジェクト: jmcneese/cacheable
 /**
  * @since   0.1
  * @author  Joshua McNeese <*****@*****.**>
  * @return  void
  */
 public function startTest($action)
 {
     parent::startTest($action);
     Configure::write('Cache.disable', false);
     Configure::write('Cache.check', true);
 }
コード例 #29
0
 /**
  * Start test method
  *
  * @return void
  * @access public
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Model = new BArticle();
     $this->Behavior = $this->Model->Behaviors->Btree;
 }
コード例 #30
0
ファイル: mailer.test.php プロジェクト: hiromi2424/mailer
 /**
  * startTest method
  *
  * @return void
  */
 public function startTest($method = null)
 {
     parent::startTest($method);
     $this->_initComponent();
 }