/** * setUp * * @return void */ public function setUp() { parent::setUp(); App::build(array('View' => array(CakePlugin::path('Taxonomy') . 'View' . DS)), App::APPEND); $this->VocabulariesController = $this->generate('Taxonomy.Vocabularies', array('methods' => array('redirect'), 'components' => array('Auth' => array('user'), 'Session'))); $this->VocabulariesController->Auth->staticExpects($this->any())->method('user')->will($this->returnCallback(array($this, 'authUserCallback'))); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $this->UsersController = $this->generate('Users.Users', array('methods' => array('redirect', 'onAdminLoginFailure'), 'components' => array('Auth' => array('user', 'identify', 'login'), 'Session', 'Security'))); $this->controller->helpers = array('Html' => array('className' => 'Croogo.CroogoHtml')); $this->controller->Auth->staticExpects($this->any())->method('identify')->will($this->returnCallback(array($this, 'authIdentifyFalse'))); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $this->ContactsController = $this->generate('Contacts.Contacts', array('methods' => array('redirect', '_send_email'), 'components' => array('Auth' => array('user'), 'Session'))); $this->controller->plugin = 'Contacts'; $this->controller->Auth->staticExpects($this->any())->method('user')->will($this->returnCallback(array($this, 'authUserCallback'))); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; $_SERVER['SERVER_NAME'] = 'localhost'; $this->CommentsController = $this->generate('Comments.Comments', array('methods' => array('redirect'), 'components' => array('Auth' => array('user'), 'Session'))); $this->CommentsController->Auth->staticExpects($this->any())->method('user')->will($this->returnCallback(array($this, 'authUserCallback'))); }
/** * setUp */ public function setUp() { parent::setUp(); CakePlugin::load('Translate', array('bootstrap' => true)); $this->TranslateController = $this->generate('Translate.Translate', array('methods' => array('redirect'), 'components' => array('Auth' => array('user'), 'Session'))); $this->TranslateController->Auth->staticExpects($this->any())->method('user')->will($this->returnCallback(array($this, 'authUserCallback'))); $this->TranslateController->Security->Session = $this->getMock('CakeSession'); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $this->NodesController = $this->generate('Nodes.Nodes', array('methods' => array('redirect', 'is'), 'components' => array('Auth' => array('user'), 'Session', 'Security' => array('blackHole')))); $this->NodesController->Node->Behaviors->detach('Acl'); $this->NodesController->Auth->staticExpects($this->any())->method('user')->will($this->returnCallback(array($this, 'authUserCallback'))); $this->NodesController->Security->Session = $this->getMock('CakeSession'); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $request = new CakeRequest(); $response = new CakeResponse(); $this->Blocks = new TestBlocksController($request, $response); $this->Blocks->constructClasses(); $this->Blocks->Security = $this->getMock('SecurityComponent', null, array($this->Blocks->Components)); $request->params['controller'] = 'blocks'; $request->params['pass'] = $request->params['named'] = array(); $this->BlocksController = $this->generate('Blocks', array('methods' => array('redirect'), 'components' => array('Auth' => array('user'), 'Session'))); $this->BlocksController->Auth->staticExpects($this->any())->method('user')->will($this->returnCallback(array($this, 'authUserCallback'))); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; $_SERVER['SERVER_NAME'] = 'localhost'; $request = new CakeRequest(); $response = new CakeResponse(); $this->Comments = new TestCommentsController($request, $response); $this->Comments->constructClasses(); $this->Comments->request->params['controller'] = 'Comments'; $this->Comments->request->params['pass'] = array(); $this->Comments->request->params['named'] = array(); $this->CommentsController = $this->generate('Comments', array('methods' => array('redirect'), 'components' => array('Auth' => array('user'), 'Session'))); $this->CommentsController->Auth->staticExpects($this->any())->method('user')->will($this->returnCallback(array($this, 'authUserCallback'))); }
public function setUp() { parent::setUp(); $this->generate('TestApp', array('components' => array('Auth', 'Security', 'Acl.AclFilter', 'Blocks.Blocks', 'Menus.Menus', 'Taxonomy.Taxonomies'))); }
/** * setUp * * @return void */ public function setUp() { parent::setUp(); $this->LanguagesController = $this->generate('Settings.Languages', array('methods' => array('redirect'), 'components' => array('Auth' => array('user'), 'Session'))); $this->LanguagesController->Auth->staticExpects($this->any())->method('user')->will($this->returnCallback(array($this, 'authUserCallback'))); }