當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CroogoTestCase類代碼示例

本文整理匯總了PHP中CroogoTestCase的典型用法代碼示例。如果您正苦於以下問題:PHP CroogoTestCase類的具體用法?PHP CroogoTestCase怎麽用?PHP CroogoTestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了CroogoTestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 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');
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:7,代碼來源:TrackableBehaviorTest.php

示例2: setUp

 /**
  * 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);
 }
開發者ID:Demired,項目名稱:CakeWX,代碼行數:11,代碼來源:NodesHelperTest.php

示例3: setUp

 /**
  * 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);
 }
開發者ID:dlpc,項目名稱:CakeWX,代碼行數:12,代碼來源:TaxonomiesHelperTest.php

示例4: setUp

 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;
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:10,代碼來源:BaseApiComponentTest.php

示例5: setUp

 /**
  * 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');
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:15,代碼來源:MultiColumnAuthenticateTest.php

示例6: setUp

 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();
 }
開發者ID:laiello,項目名稱:plankonindia,代碼行數:11,代碼來源:CroogoComponentTest.php

示例7: setUp

 /**
  * 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');
 }
開發者ID:laiello,項目名稱:plankonindia,代碼行數:15,代碼來源:RegionsHelperTest.php

示例8: setUp

 /**
  * 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');
 }
開發者ID:Demired,項目名稱:CakeWX,代碼行數:15,代碼來源:MenusHelperTest.php

示例9: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     $path = CakePlugin::path('Extensions') . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'Example';
     $Folder = new Folder($path);
     $Folder->delete();
     $path = CakePlugin::path('Extensions') . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'Minimal';
     $Folder = new Folder($path);
     $Folder->delete();
     $File = new File(CakePlugin::path('Extensions') . 'Test' . DS . 'test_app' . DS . 'composer.json');
     $File->delete();
 }
開發者ID:dlpc,項目名稱:CakeWX,代碼行數:17,代碼來源:CroogoComposerTest.php

示例10: setUp

 /**
  * 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');
 }
開發者ID:laiello,項目名稱:plankonindia,代碼行數:15,代碼來源:MenusHelperTest.php

示例11: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     $Folder = new Folder(TMP);
     $files = $Folder->find('croogo_.*');
     foreach ($files as $file) {
         unlink(TMP . $file);
     }
     $Folder = new Folder(TESTS . 'test_app' . DS . 'Plugin' . DS . 'Example');
     $Folder->delete();
     $Folder = new Folder(TESTS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'Minimal');
     $Folder->delete();
 }
開發者ID:romaing,項目名稱:croogo-rg,代碼行數:18,代碼來源:InstallShellTest.php

示例12: setUp

 /**
  * 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();
 }
開發者ID:dlpc,項目名稱:CakeWX,代碼行數:17,代碼來源:CroogoHelperTest.php

示例13: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     $path = CakePlugin::path('Extensions') . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'Example';
     $Folder = new Folder($path);
     $Folder->delete();
     $path = CakePlugin::path('Extensions') . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'Minimal';
     $Folder = new Folder($path);
     $Folder->delete();
     if (file_exists($this->minimalPlugin)) {
         unlink($this->minimalPlugin);
     }
     if (file_exists($this->invalidPlugin)) {
         unlink($this->invalidPlugin);
     }
 }
開發者ID:croogo,項目名稱:croogo,代碼行數:21,代碼來源:ExtensionsInstallerTest.php

示例14: tearDown

 public function tearDown()
 {
     parent::tearDown();
     unset($this->Setting);
 }
開發者ID:romaing,項目名稱:croogo-rg,代碼行數:5,代碼來源:SettingTest.php

示例15: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     CroogoPlugin::unload('Shops');
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:10,代碼來源:CroogoEventManagerTest.php


注:本文中的CroogoTestCase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。