/**
  * 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;
 }
Example #2
0
 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);
 }
Example #3
0
 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);
 }
 /**
  * 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);
 }
 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]);
 }
 /**
  * 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);
 }
Example #7
0
 /**
  * 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');
 }
 /**
  * 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]);
 }
Example #9
0
 /**
  * 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;
 }
Example #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');
 }
Example #11
0
 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));
 }
 /**
  * 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();
     }
 }
 /**
  * (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();
 }
 public function startTest($method = null)
 {
     parent::startTest($method);
     $this->__loadController();
     $_SERVER['REQUEST_METHOD'] = 'POST';
 }
Example #15
0
 /**
  *
  *
  * @param unknown $method
  */
 public function startTest($method)
 {
     parent::startTest($method);
     $this->Throttle = ClassRegistry::init('Icing.Throttle');
 }
 function startTest($method = null)
 {
     parent::startTest($method);
 }
 /**
  * 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();
     }
 }
 function startTest($method = null)
 {
     $this->_loadController();
     parent::startTest($method);
 }
 public function startTest($method)
 {
     parent::startTest($method);
     $this->logMethodCall(__FUNCTION__);
 }
 /**
  * startTest method
  *
  * @param mixed $method
  * @access public
  * @return void
  */
 function startTest($method)
 {
     parent::startTest($method);
     $this->_initDb();
 }
Example #21
0
 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);
 }
Example #22
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->DeletableArticle = ClassRegistry::init('DeletableArticle');
 }
Example #23
0
 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.');
 }
Example #24
0
 public function startTest($method)
 {
     parent::startTest($method);
     $this->SelectOptions = new SelectOptionsHelper();
 }
Example #25
0
 /**
  * Runs prior to running the test method
  *
  * @param string $method The test method
  * @return void
  */
 public function startTest($method)
 {
     parent::startTest($method);
     Router::reload();
 }
Example #26
0
 public function startTest($action)
 {
     parent::startTest($action);
     $this->SlugArticle = ClassRegistry::init('SlugArticle');
 }
Example #27
0
 /**
  * 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');
 }
Example #28
0
 /**
  * @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);
 }
Example #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;
 }
Example #30
0
 /**
  * startTest method
  *
  * @return void
  */
 public function startTest($method = null)
 {
     parent::startTest($method);
     $this->_initComponent();
 }