Exemplo n.º 1
0
 public function setUp()
 {
     parent::setUp();
     $this->User = ClassRegistry::init('CommonTestStateableUser');
     $this->Invoice = ClassRegistry::init('CommonTestStateableInvoice');
     $this->Invalid = ClassRegistry::init('CommonTestStateableInvalid');
 }
Exemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     $this->User = ClassRegistry::init('CommonTestComputableUser');
     $this->Invoice = ClassRegistry::init('CommonTestComputableInvoice');
     $this->Computable = $this->Invoice->Behaviors->Computable;
 }
Exemplo n.º 3
0
 public function setUp()
 {
     parent::setUp();
     $this->Company = ClassRegistry::init('CommonTestAuthorizableCompany');
     $this->Department = ClassRegistry::init('CommonTestAuthorizableDepartment');
     $this->Doc = ClassRegistry::init('CommonTestAuthorizableDoc');
     $this->Record = ClassRegistry::init('CommonTestAuthorizableRecord');
     $this->User = ClassRegistry::init('CommonTestAuthorizableUser');
 }
Exemplo n.º 4
0
 public function setUp()
 {
     parent::setUp();
     if (!CakePlugin::loaded('Common')) {
         CakePlugin::load('Common');
     }
     $this->CakeRequest = $this->getMock('CakeRequest', array('is'));
     $this->Controller = $this->getMock('TestCommonController', array('redirect', 'referer', 'set'), array($this->CakeRequest, new CakeResponse()));
     $this->Controller->Components = $this->getMock('ComponentCollection', array('init'));
     $this->Controller->eventManager = $this->getMock('CommonEventManager', array('listPlugins'));
     $this->Controller->eventManager->expects($this->any())->method('listPlugins')->will($this->returnValue(array()));
     $this->Controller->Session = $this->getMock('SessionComponent', array('setFlash'), array($this->Controller->Components));
     $this->Controller->constructClasses();
     $this->flashMessage = String::insert($this->Controller->alertMessages['delete.success']['message'], array('modelName' => 'Test'), array('clean' => true));
 }
Exemplo n.º 5
0
 public function setUp()
 {
     parent::setUp();
     if (empty($_GET['bootstrap'])) {
         $this->__resetPlugins = array();
         foreach (array('TwitterBootstrap', 'BoostCake') as $plugin) {
             if (CakePlugin::loaded($plugin)) {
                 $resetPlugins[] = $plugin;
                 CakePlugin::unload($plugin);
             }
         }
     }
     $this->View = $this->getMock('View', array('append'), array(new TableHelperTestController()));
     $this->Table = new TestTableHelper($this->View);
     $this->Table->Paginator = new PaginatorHelper($this->View);
     if (CakePlugin::loaded('TwitterBootstrap')) {
         App::uses('BootstrapPaginatorHelper', 'TwitterBootstrap.View/Helper');
         $this->Table->Paginator = new BootstrapPaginatorHelper($this->View);
     }
     $this->Table->Paginator->request = new CakeRequest(null, false);
     $this->Table->Paginator->request->addParams(array('paging' => array('Article' => array('page' => 1, 'current' => 2, 'count' => 8, 'prevPage' => false, 'nextPage' => true, 'pageCount' => 3, 'order' => null, 'limit' => 3, 'options' => array('page' => 1, 'conditions' => array()), 'paramType' => 'named'))));
 }
Exemplo n.º 6
0
 public function setUp()
 {
     parent::setUp();
     $this->Model = ClassRegistry::init('TestCommonAppModel');
 }
Exemplo n.º 7
0
 public function setUp()
 {
     parent::setUp();
     $this->User = ClassRegistry::init('CommonTestConfirmableUser');
 }
Exemplo n.º 8
0
 public function setUp()
 {
     $this->helper = $this->getMockForAbstractClass('Zend\\Form\\View\\Helper\\AbstractHelper');
     parent::setUp();
 }
Exemplo n.º 9
0
 public function setUp()
 {
     parent::setUp();
     $this->User = ClassRegistry::init('SecurityTestTokenizableUser');
 }
Exemplo n.º 10
0
 public function setUp()
 {
     parent::setUp();
     $this->Helper = new TestCommonAppHelper(new View());
     Router::reload();
 }
Exemplo n.º 11
0
 public function setUp()
 {
     parent::setUp();
     $this->Post = ClassRegistry::init('CommonTestCommentablePost');
 }
Exemplo n.º 12
0
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->Model = ClassRegistry::init('TestModel');
     $this->User = ClassRegistry::init('TestUser');
 }
Exemplo n.º 13
0
 public function setUp()
 {
     parent::setUp();
     $this->Original = ClassRegistry::init('CommonTestOriginal');
     $this->Duplicate = ClassRegistry::init('CommonTestDuplicate');
 }
Exemplo n.º 14
0
 public function setUp()
 {
     parent::setUp();
     self::$_menus = Navigation::items();
 }
Exemplo n.º 15
0
 public function setUp()
 {
     parent::setUp();
     $this->AccessLimit = ClassRegistry::init('Security.AccessLimit');
 }
Exemplo n.º 16
0
 public function setUp()
 {
     parent::setUp();
     $this->Token = ClassRegistry::init('Security.SecurityToken');
 }
Exemplo n.º 17
0
 public function setUp()
 {
     parent::setUp();
 }