public function setUp() { parent::setUp(); App::build(array('Plugin' => array(CakePlugin::path('Extensions') . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), App::PREPEND); $this->CroogoPlugin = $this->getMock('CroogoPlugin', array('_writeSetting', 'needMigration')); $this->_mapping = array(1346748762 => array('version' => 1346748762, 'name' => '1346748762_first', 'class' => 'First', 'type' => 'app', 'migrated' => '2012-09-04 10:52:42'), 1346748933 => array('version' => 1346748933, 'name' => '1346748933_addstatus', 'class' => 'AddStatus', 'type' => 'app', 'migrated' => '2012-09-04 10:55:33')); }
/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $Folder = new Folder(APP . 'Plugin' . DS . 'Example'); $Folder->copy(TESTS . 'test_app' . DS . 'Plugin' . DS . 'Example'); $this->Setting = ClassRegistry::init('Settings.Setting'); }
public function setUp() { parent::setUp(); $this->View = new View(null); $this->AppHelper = new AppHelper($this->View); $this->AppHelper->request = new CakeRequest(null, false); }
public function setUp() { $this->FileManager = new FileManager(false, null, null, null); $this->__testAppPath = CakePlugin::path('FileManager') . 'Test' . DS . 'test_app' . DS; $this->__setFilePathsForTests(); parent::setUp(); }
/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $Folder = new Folder(APP . 'Plugin' . DS . 'Example'); $Folder->copy(CakePlugin::path('Croogo') . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'Example'); $this->Setting = ClassRegistry::init('Settings.Setting'); }
public function setUp() { parent::setUp(); $this->loadFixtures('Trackable'); $this->model = ClassRegistry::init(array('class' => 'TestModel', 'alias' => 'TestModel', 'table' => 'trackables')); $this->model->Behaviors->attach('Croogo.Trackable'); }
public function setUp() { parent::setUp(); $this->_level = Configure::read('Comment.level'); Configure::write('Comment.level', 10); $this->Comment = ClassRegistry::init('Comments.Comment'); $this->_record = $this->Comment->findById(1); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $this->OrderRecord = ClassRegistry::init('OrderRecord'); $this->OrderRecord->Behaviors->attach('Ordered', array('field' => 'weight', 'foreign_key' => null)); $this->defaultPrefix = Configure::read('Cache.defaultPrefix'); $this->Block = ClassRegistry::init('Blocks.Block'); }
/** * setUp */ public function setUp() { parent::setUp(); $request = $this->getMock('CakeRequest'); $response = $this->getMock('CakeResponse'); $this->View = new View(new TheNodesTestController($request, $response)); $this->Nodes = new NodesHelper($this->View); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $this->User = ClassRegistry::init('Users.User'); $this->User->Behaviors->unload('Acl'); $this->User->Behaviors->unload('Searchable'); $this->defaultPrefix = Configure::read('Cache.defaultPrefix'); }
public function setUp() { parent::setUp(); CakePlugin::load('Translate'); $this->View = new View(null); $this->AppHelper = new CroogoAppHelper($this->View); $this->AppHelper->request = new CakeRequest(null, false); }
public function setUp() { parent::setUp(); CakePlugin::load('Translate', array('bootstrap' => true)); $this->View = new View(null); $this->AppHelper = new AppHelper($this->View); $this->AppHelper->request = new CakeRequest(null, false); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $this->Node = ClassRegistry::init('Nodes.Node'); if (!CakePlugin::loaded('Translate')) { CakePlugin::load('Translate'); } $this->Node->Behaviors->attach('Translate.CroogoTranslate', array('fields' => array('title' => 'titleTranslation'))); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); App::build(array('Plugin' => array(CakePlugin::path('Extensions') . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS), 'View' => array(CakePlugin::path('Extensions') . 'Test' . DS . 'test_app' . DS . 'View' . DS)), App::PREPEND); $this->testPlugin = CakePlugin::path('Extensions') . 'Test' . DS . 'test_files' . DS . 'example_plugin.zip'; $this->testTheme = CakePlugin::path('Extensions') . 'Test' . DS . 'test_files' . DS . 'example_theme.zip'; $this->CroogoComposer = new CroogoComposer(); $this->CroogoComposer->appPath = CakePlugin::path('Extensions') . 'Test' . DS . 'test_app' . DS; }
/** * setUp */ public function setUp() { parent::setUp(); $this->ComponentCollection = new ComponentCollection(); $request = $this->getMock('CakeRequest'); $response = $this->getMock('CakeResponse'); $this->View = new View(new TheTaxonomyTestController($request, $response)); $this->Taxonomies = new TaxonomiesHelper($this->View); }
public function setUp() { parent::setUp(); $request = $this->_apiRequest(array('api' => 'api', 'prefix' => 'v1.0', 'controller' => 'users', 'action' => 'index')); $response = $this->getMock('CakeRespone'); $this->Controller = new TestBaseApiController($request, $response); $this->Controller->constructClasses(); $this->Controller->startupProcess(); $this->TestApi = $this->Controller->TestApi; }
/** * setup * * @return void */ public function setUp() { parent::setUp(); $this->Collection = $this->getMock('ComponentCollection'); $this->auth = new MultiColumnAuthenticate($this->Collection, array('fields' => array('username' => 'user', 'password' => 'password'), 'userModel' => 'MultiUser', 'columns' => array('user', 'email'))); $password = Security::hash('password', null, true); $User = ClassRegistry::init('MultiUser'); $User->updateAll(array('password' => $User->getDataSource()->value($password))); $this->response = $this->getMock('CakeResponse'); }
public function setUp() { parent::setUp(); $this->Controller = new CroogoTestController(new CakeRequest(), new CakeResponse()); $this->Controller->constructClasses(); $this->Controller->Croogo = new MockCroogoComponent($this->Controller->Components); $this->Controller->Components->unload('Blocks'); $this->Controller->Components->unload('Menus'); $this->Controller->Components->set('Croogo', $this->Controller->Croogo); $this->Controller->startupProcess(); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $path = CakePlugin::path('Extensions') . 'Test' . DS; App::build(array('Plugin' => array($path . 'test_app' . DS . 'Plugin' . DS), 'View' => array($path . 'test_app' . DS . 'View' . DS)), App::PREPEND); $this->testPlugin = $path . 'test_files' . DS . 'example_plugin.zip'; $this->minimalPlugin = $path . 'test_files' . DS . 'minimal_plugin.zip'; $this->invalidPlugin = $path . 'test_files' . DS . 'invalid_plugin.zip'; $this->testTheme = $path . 'test_files' . DS . 'example_theme.zip'; $this->ExtensionsInstaller = new ExtensionsInstaller(); }
public function setUp() { parent::setUp(); CroogoPlugin::unload('Example'); CroogoPlugin::load('Shops'); CroogoEventManager::loadListeners(); $request = $this->getMock('CakeRequest'); $response = $this->getMock('CakeResponse'); $this->Users = new TestUsersEventController($request, $response); $this->Nodes = new TestNodesEventController($request, $response); }
/** * setUp */ public function setUp() { parent::setUp(); $this->ComponentCollection = new ComponentCollection(); $request = new CakeRequest('nodes/nodes/index'); $request->params = array('plugin' => 'nodes', 'controller' => 'nodes', 'action' => 'index', 'named' => array()); $view = new View(new TheRegionsTestController($request, new CakeResponse())); $this->Regions = $this->getMock('RegionsHelper', array('log'), array($view)); $this->_appEncoding = Configure::read('App.encoding'); $this->_asset = Configure::read('Asset'); $this->_debug = Configure::read('debug'); }
/** * setUp */ public function setUp() { parent::setUp(); $this->ComponentCollection = new ComponentCollection(); $request = $this->getMock('CakeRequest'); $response = $this->getMock('CakeResponse'); $this->View = new View(new TheMenuTestController($request, $response)); $this->Menus = new MenusHelper($this->View); $this->_appEncoding = Configure::read('App.encoding'); $this->_asset = Configure::read('Asset'); $this->_debug = Configure::read('debug'); }
/** * setUp */ public function setUp() { parent::setUp(); $this->ComponentCollection = new ComponentCollection(); $request = new CakeRequest('nodes/index'); $request->params = array('controller' => 'nodes', 'action' => 'index', 'named' => array()); $view = new View(new TheMenuTestController($request, new CakeResponse())); $this->Menus = new MenusHelper($view); $this->_appEncoding = Configure::read('App.encoding'); $this->_asset = Configure::read('Asset'); $this->_debug = Configure::read('debug'); }
/** * setUp */ public function setUp() { parent::setUp(); $this->ComponentCollection = new ComponentCollection(); $request = new CakeRequest('nodes/index'); $request->params = array('controller' => 'nodes', 'action' => 'index', 'named' => array()); $view = new View(new TheCroogoTestController($request, new CakeResponse())); $this->Croogo = new CroogoHelper($view); $aclHelper = Configure::read('Site.acl_plugin') . 'Helper'; $this->Croogo->Acl = $this->getMock($aclHelper, array('linkIsAllowedByRoleId'), array($view)); $this->Croogo->Acl->expects($this->any())->method('linkIsAllowedByRoleId')->will($this->returnValue(true)); $this->menus = CroogoNav::items(); CroogoNav::clear(); }
/** * setUp */ public function setUp() { parent::setUp(); $this->CroogoJsonReader = $this->getMock('MockCroogoJsonReader', null, array(TESTS . 'test_app' . DS . 'Config' . DS)); $this->testFile = $this->CroogoJsonReader->getPath() . 'test.json'; }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $this->Node = ClassRegistry::init('Nodes.Node'); }
public function setUp() { parent::setUp(); $this->Taxonomy = ClassRegistry::init('Taxonomy.Taxonomy'); }
/** * setUp method * * @return void */ public function setUp() { parent::setUp(); App::build(array('Plugin' => array(TESTS . 'test_app' . DS . 'Plugin' . DS), 'View' => array(TESTS . 'test_app' . DS . 'View' . DS)), App::PREPEND); }
public function setUp() { parent::setUp(); $this->Node = ClassRegistry::init('Nodes.Node'); $this->Node->Behaviors->unload('Acl'); }
public function setUp() { parent::setUp(); self::$_menus = CroogoNav::items(); }