function setUp()
 {
     parent::setUp();
     $this->_pluginPath = App::pluginPath('AssetCompress');
     $this->_testPath = $this->_pluginPath . 'Test/test_files/css/';
     $this->filter = new TimestampImage();
 }
示例#2
0
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $controller = null;
     $this->View = new View($controller);
     $this->Rss = new RssHelper($this->View);
 }
 /**
  * This function sets up a HttpSocket instance we are going to use for testing
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->HttpSocket = new DigestHttpSocket();
     $this->HttpSocket->request['method'] = 'GET';
     $this->HttpSocket->request['uri']['path'] = '/';
 }
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $controller = null;
     $this->View = $this->getMock('View', array('addScript'), array(&$controller));
     $this->Moo = new MootoolsEngineHelper($this->View);
 }
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->Time = new CakeTime();
     $this->_systemTimezoneIdentifier = date_default_timezone_get();
     Configure::write('Config.language', 'eng');
 }
示例#6
0
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->BlogFrameSetting = ClassRegistry::init('Blogs.BlogFrameSetting');
     // モデルからビヘイビアをはずす:
     $this->BlogFrameSetting->Behaviors->unload('Trackable');
 }
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('Cache.disable', true);
     App::build();
     App::objects('plugin', null, true);
 }
 /**
  * setUp method
  *
  * Se the request info to something innocuous but valid, link the helper to a view instance
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Router::setRequestInfo(array(array('controller' => 'posts', 'action' => 'action'), array('base' => '/', 'webroot' => '/', 'here' => '/posts/action')));
     $View = new View();
     $this->Menu = new MenuHelper($View);
 }
 /**
  * setup test
  *
  * @return void
  */
 public function setUp()
 {
     $this->out = $this->getMock('ConsoleOutput', array(), array(), '', false);
     $this->in = $this->getMock('ConsoleInput', array(), array(), '', false);
     $this->Shell = $this->getMock('TranslationsShell', array('in', 'out', 'hr', 'err', '_stop', '_getModels'), array($this->out, $this->out, $this->in));
     parent::setUp();
 }
示例#10
0
 /**
  * setUp
  *
  * @retun void
  * @access public
  */
 public function setUp()
 {
     parent::setUp();
     $this->Controller = new Controller(null);
     $this->View = new View($this->Controller);
     $this->Locale = new LocaleHelper($this->View, array('locale' => 'pt_BR'));
 }
 public function setUp()
 {
     parent::setUp();
     $Controller = new Controller();
     $View = new View($Controller);
     $this->Tab = new BootstrapTabHelper($View);
 }
 public function setUp()
 {
     parent::setUp();
     $Controller = new Controller();
     $View = new View($Controller);
     $this->Progress = new ProgressHelper($View);
 }
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->View = new View();
     $this->Form = new BoostCakeFormHelper($this->View);
     ClassRegistry::addObject('Contact', new Contact());
 }
示例#14
0
 /**
  * Start test
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->Version = new MigrationVersion(array('connection' => 'test', 'autoinit' => false));
     App::build(array('plugins' => CakePlugin::path('Migrations') . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS));
     Configure::write('Config.language', 'en');
 }
示例#15
0
 public function setUp()
 {
     parent::setUp();
     Configure::delete('Ajax');
     $this->Controller = new AjaxComponentTestController(new CakeRequest(), new CakeResponse());
     $this->Controller->constructClasses();
 }
示例#16
0
/**
 * setUp method
 *
 * @return void
 */
	public function setUp() {
		parent::setUp();
		$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
		$in = $this->getMock('ConsoleInput', array(), array(), '', false);
		$this->Task = $this->getMock('ControllerTask',
			array('in', 'out', 'err', 'hr', 'createFile', '_stop', '_checkUnitTest'),
			array($out, $out, $in)
		);
		$this->Task->name = 'Controller';
		$this->Task->Template = new TemplateTask($out, $out, $in);
		$this->Task->Template->params['theme'] = 'default';

		$this->Task->Model = $this->getMock('ModelTask',
			array('in', 'out', 'err', 'createFile', '_stop', '_checkUnitTest'),
			array($out, $out, $in)
		);
		$this->Task->Project = $this->getMock('ProjectTask',
			array('in', 'out', 'err', 'createFile', '_stop', '_checkUnitTest', 'getPrefix'),
			array($out, $out, $in)
		);
		$this->Task->Test = $this->getMock('TestTask', array(), array($out, $out, $in));

		if (!defined('ARTICLE_MODEL_CREATED')) {
			$this->markTestSkipped('Could not run as an Article, Tag or Comment model was already loaded.');
		}
	}
 public function setUp()
 {
     parent::setUp();
     $Controller = new Controller();
     $View = new View($Controller);
     $this->Wysiwyg = new WysiwygHelper($View, array('_editor' => 'Ck'));
 }
示例#18
0
 /**
  * setUp
  *
  * @retun void
  * @access public
  */
 function setUp()
 {
     parent::setUp();
     $this->Formatacao = new FormatacaoHelper();
     $this->Formatacao->Time = new TimeHelper();
     $this->Formatacao->Number = new NumberHelper();
 }
示例#19
0
 public function setUp()
 {
     CakeResque::$resqueClass = $this->Resque = $this->getMockClass('Resque', array('enqueue'));
     CakeResque::$resqueSchedulerClass = $this->ResqueScheduler = $this->getMockClass('ResqueScheduler\\ResqueScheduler', array('enqueueIn', 'enqueueAt'));
     $this->fixture = array('queue' => 'default', 'class' => 'TestShell', 'args' => array('main', 'arg1'), 'track' => false);
     parent::setUp();
 }
示例#20
0
 /**
  * setUp
  *
  * @return void
  * @access public
  */
 public function setUp()
 {
     parent::setUp();
     $this->Session = ClassRegistry::init('SerializedSession');
     $this->Content = ClassRegistry::init('SerializedContent');
     $this->settings =& $this->Session->Behaviors->Serializable->settings;
 }
 public function setUp()
 {
     parent::setUp();
     $Controller = new Controller();
     $View = new View($Controller);
     $this->Gravatar = new GravatarHelper($View);
 }
示例#22
0
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $controller = new Controller();
     $this->MediaView = $this->getMock('MediaView', array('_isActive', '_clearBuffer', '_flushBuffer'));
     $this->MediaView->response = $this->getMock('CakeResponse');
 }
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $shell = $this->getMock('Shell', array(), array(), '', false);
     $dispatcher = $this->getMock('ShellDispatcher', array(), array(), '', false);
     $this->Tasks = new TaskCollection($shell, $dispatcher);
 }
 /**
  * Setup
  * 
  * @author	Everton Yoshitani <*****@*****.**>
  * @since	1.0
  * @return	void 
  */
 public function setUp()
 {
     parent::setUp();
     $this->TestModel = $this->getMock('Thing');
     $this->ApiBehavior = new ApiBehavior();
     $this->ApiBehavior->setup($this->TestModel);
 }
示例#25
0
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Cache::delete('object_map', '_cake_core_');
     App::build(array('Locale' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS), 'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), App::RESET);
     CakePlugin::load(array('TestPlugin'));
 }
 /**
  * SetUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('Config.language', 'deu');
     Configure::delete('Passwordable');
     Configure::write('Passwordable.auth', 'AuthTest');
     $this->User = ClassRegistry::init('Tools.ToolsUser');
     if (isset($this->User->validate['pwd'])) {
         unset($this->User->validate['pwd']);
     }
     if (isset($this->User->validate['pwd_repeat'])) {
         unset($this->User->validate['pwd_repeat']);
     }
     if (isset($this->User->validate['pwd_current'])) {
         unset($this->User->validate['pwd_current']);
     }
     if (isset($this->User->order)) {
         unset($this->User->order);
     }
     $this->User->create();
     $data = ['id' => '5', 'name' => 'admin', 'password' => Security::hash('somepwd', null, true), 'role_id' => '1'];
     $this->User->set($data);
     $result = $this->User->save();
     $this->assertTrue((bool) $result);
     Router::setRequestInfo(new CakeRequest(null, false));
 }
 /**
  * setup test
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $out = $this->getMock('ConsoleOutput', array(), array(), '', false);
     $in = $this->getMock('ConsoleInput', array(), array(), '', false);
     $this->Shell = $this->getMock('BakeShell', array('in', 'out', 'hr', 'err', 'createFile', '_stop', '_checkUnitTest'), array($out, $out, $in));
 }
 public function setUp()
 {
     parent::setUp();
     $this->Controller = new Controller();
     $this->View = new View($this->Controller);
     $this->Searchable = new SearchableHelper($this->View);
 }
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $out = $this->getMock('ConsoleOutput', array(), array(), '', false);
     $in = $this->getMock('ConsoleInput', array(), array(), '', false);
     $this->Task = $this->getMock('TemplateTask', array('in', 'err', 'createFile', '_stop', 'clear'), array($out, $out, $in));
 }
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $controller = NULL;
     $this->View = $this->getMock('View', array('addScript'), array(&$controller));
     $this->Proto = new PrototypeEngineHelper($this->View);
 }