コード例 #1
0
 function setUp()
 {
     parent::setUp();
     $this->_pluginPath = App::pluginPath('AssetCompress');
     $this->_testPath = $this->_pluginPath . 'Test/test_files/css/';
     $this->filter = new TimestampImage();
 }
コード例 #2
0
ファイル: RssHelperTest.php プロジェクト: hupla78/Nadia
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $controller = null;
     $this->View = new View($controller);
     $this->Rss = new RssHelper($this->View);
 }
コード例 #3
0
 /**
  * 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'] = '/';
 }
コード例 #4
0
 /**
  * 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);
 }
コード例 #5
0
 /**
  * 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');
 }
コード例 #7
0
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('Cache.disable', true);
     App::build();
     App::objects('plugin', null, true);
 }
コード例 #8
0
 /**
  * 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);
 }
コード例 #9
0
 /**
  * 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
ファイル: LocaleHelperTest.php プロジェクト: radig/locale
 /**
  * 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'));
 }
コード例 #11
0
 public function setUp()
 {
     parent::setUp();
     $Controller = new Controller();
     $View = new View($Controller);
     $this->Tab = new BootstrapTabHelper($View);
 }
コード例 #12
0
 public function setUp()
 {
     parent::setUp();
     $Controller = new Controller();
     $View = new View($Controller);
     $this->Progress = new ProgressHelper($View);
 }
コード例 #13
0
 /**
  * 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
ファイル: AjaxComponentTest.php プロジェクト: Jony01/LLD
 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.');
		}
	}
コード例 #17
0
 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;
 }
コード例 #21
0
 public function setUp()
 {
     parent::setUp();
     $Controller = new Controller();
     $View = new View($Controller);
     $this->Gravatar = new GravatarHelper($View);
 }
コード例 #22
0
ファイル: MediaViewTest.php プロジェクト: Nervie/Beta
 /**
  * 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');
 }
コード例 #23
0
 /**
  * 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);
 }
コード例 #24
0
 /**
  * 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
ファイル: I18nTest.php プロジェクト: kuradakis/cakephp-ex
 /**
  * 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'));
 }
コード例 #26
0
 /**
  * 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));
 }
コード例 #27
0
 /**
  * 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));
 }
コード例 #28
0
 public function setUp()
 {
     parent::setUp();
     $this->Controller = new Controller();
     $this->View = new View($this->Controller);
     $this->Searchable = new SearchableHelper($this->View);
 }
コード例 #29
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('TemplateTask', array('in', 'err', 'createFile', '_stop', 'clear'), array($out, $out, $in));
 }
コード例 #30
0
 /**
  * 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);
 }