当前位置: 首页>>代码示例>>PHP>>正文


PHP CakePlugin::path方法代码示例

本文整理汇总了PHP中CakePlugin::path方法的典型用法代码示例。如果您正苦于以下问题:PHP CakePlugin::path方法的具体用法?PHP CakePlugin::path怎么用?PHP CakePlugin::path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CakePlugin的用法示例。


在下文中一共展示了CakePlugin::path方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testParse

 public function testParse()
 {
     $path = CakePlugin::path('Translations') . 'Test/Files/simple.plist';
     $result = PlistParser::parse($path);
     $expected = array('count' => 1, 'translations' => array(array('locale' => 'en', 'domain' => 'default', 'category' => 'LC_MESSAGES', 'key' => 'foo', 'value' => 'foo value')));
     $this->assertSame($expected, $result);
 }
开发者ID:nodesagency,项目名称:Translations,代码行数:7,代码来源:PlistParserTest.php

示例2: suite

 /**
  * Suite define the tests for this suite
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new CakeTestSuite('All Bs3Helpers tests');
     $path = CakePlugin::path('Bs3Helpers') . 'Test' . DS . 'Case' . DS . 'View' . DS . 'Helper' . DS;
     $suite->addTestDirectory($path);
     return $suite;
 }
开发者ID:Cakephp-Italia,项目名称:cakephp-bootstrap3-helpers,代码行数:12,代码来源:AllTestsTest.php

示例3: testImageFromBlob

 /**
  * HtmlExtHelperTest::testImageFromBlob()
  *
  * @return void
  */
 public function testImageFromBlob()
 {
     $folder = CakePlugin::path('Tools') . 'Test' . DS . 'test_files' . DS . 'img' . DS;
     $content = file_get_contents($folder . 'hotel.png');
     $is = $this->Html->imageFromBlob($content);
     $this->assertTrue(!empty($is));
 }
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:12,代码来源:HtmlExtHelperTest.php

示例4: _configTestFile

 protected function _configTestFile($path = null, $baseKey = null)
 {
     if ($path === null) {
         $path = CakePlugin::path('YamlReader') . 'Test' . DS . 'files' . DS;
     }
     Configure::config('YamlTestConfig', new YamlReader($path, $baseKey));
 }
开发者ID:hiromi2424,项目名称:yaml_reader,代码行数:7,代码来源:YamlReaderTest.php

示例5: setUp

 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();
 }
开发者ID:saydulk,项目名称:croogo,代码行数:7,代码来源:FileManagerTest.php

示例6: _basePath

 /**
  * Generates the base path to a set of tests based on the parameters.
  *
  * @param array $params
  * @return string The base path.
  */
 protected static function _basePath($params)
 {
     $result = null;
     if (!empty($params['core'])) {
         $result = CORE_TEST_CASES;
         // CUSTOMIZE ADD 2014/07/02 ryuring
         // >>>
     } elseif ($params['baser']) {
         $result = BASER_TEST_CASES;
         // <<<
     } elseif (!empty($params['plugin'])) {
         if (!CakePlugin::loaded($params['plugin'])) {
             try {
                 CakePlugin::load($params['plugin']);
                 $result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case';
             } catch (MissingPluginException $e) {
             }
         } else {
             $result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case';
         }
     } elseif (!empty($params['app'])) {
         $result = APP_TEST_CASES;
     }
     return $result;
 }
开发者ID:baserproject,项目名称:basercms,代码行数:31,代码来源:BaserTestLoader.php

示例7: suite

 public static function suite()
 {
     $suite = new CakeTestSuite('OAuth Tests');
     $path = CakePlugin::path('OAuth') . 'Test' . DS . 'Case' . DS;
     $suite->addTestDirectory($path . 'Model' . DS . 'Behavior');
     return $suite;
 }
开发者ID:thomseddon,项目名称:cakephp-oauth-server,代码行数:7,代码来源:AllOAuthTestsTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     App::build(['Model' => [CakePlugin::path('Tools') . 'Test' . DS . 'test_app' . DS . 'Model' . DS]], App::RESET);
     $this->Comment = ClassRegistry::init('BitmaskedComment');
     $this->Comment->Behaviors->load('Tools.Bitmasked', ['mappedField' => 'statuses']);
 }
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:7,代码来源:BitmaskedBehaviorTest.php

示例9: suite

 /**
  * Suite define the tests for this suite
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new CakeTestSuite('All Datasources test');
     $path = CakePlugin::path('InlineCss') . 'Test' . DS . 'Case' . DS;
     $suite->addTestDirectoryRecursive($path);
     return $suite;
 }
开发者ID:drmonkeyninja,项目名称:cakephp-inline-css,代码行数:12,代码来源:AllInlineCssTest.php

示例10: init

 /**
  * Initialization.
  *
  * It loads the required classes for web and cli environments.
  *
  * @throws ConfigureException if needed configuration parameters are not found.
  * @param array $config Configuration options.
  * @return void
  */
 public static function init($config = null)
 {
     self::loadConfig($config);
     if (!($redis = Configure::read('CakeResque.Redis')) || !($resqueLib = Configure::read('CakeResque.Resque.lib')) || !($schedulerLib = Configure::read('CakeResque.Scheduler.lib')) || !($statusLib = Configure::read('CakeResque.Status.lib'))) {
         throw new ConfigureException(__d('cake_resque', 'There is an error in the configuration file.'));
     }
     if (empty($redis['host']) || empty($redis['port']) || empty($redis['database']) && !is_numeric($redis['database']) || empty($redis['namespace'])) {
         throw new ConfigureException(__d('cake_resque', 'There is an error in the Redis configuration key.'));
     }
     $pluginVendorPath = CakePlugin::path('CakeResque') . 'vendor' . DS;
     if (!Folder::isAbsolute($resqueLib)) {
         $resqueLib = $pluginVendorPath . $resqueLib;
     }
     $resqueLib .= DS . 'lib' . DS;
     if (!Folder::isAbsolute($schedulerLib)) {
         $schedulerLib = $pluginVendorPath . $schedulerLib;
     }
     $schedulerLib .= DS . 'lib' . DS . 'ResqueScheduler' . DS;
     if (!Folder::isAbsolute($statusLib)) {
         $statusLib = $pluginVendorPath . $statusLib;
     }
     require_once realpath($resqueLib . 'Resque.php');
     require_once realpath($resqueLib . 'Resque' . DS . 'Worker.php');
     require_once realpath($schedulerLib . 'ResqueScheduler.php');
     require_once realpath($schedulerLib . 'Stat.php');
     require_once realpath($schedulerLib . 'Job' . DS . 'Status.php');
     require_once realpath($statusLib . DS . 'src' . DS . 'ResqueStatus' . DS . 'ResqueStatus.php');
     Resque::setBackend($redis['host'] . ':' . $redis['port'], $redis['database'], $redis['namespace']);
 }
开发者ID:rchavik,项目名称:Cake-Resque,代码行数:38,代码来源:CakeResque.php

示例11: suite

 /**
  * Suite define the tests for this plugin
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new CakeTestSuite('All VatNumberCheck test');
     $path = CakePlugin::path('VatNumberCheck') . 'Test' . DS . 'Case' . DS;
     $suite->addTestDirectoryRecursive($path);
     return $suite;
 }
开发者ID:oefenweb,项目名称:cakephp-vat-number-check,代码行数:12,代码来源:AllVatNumberCheckTest.php

示例12: suite

 public static function suite()
 {
     $suite = new CakeTestSuite('All Extensions plugin tests');
     $path = CakePlugin::path('Extensions') . DS . 'Test' . DS . 'Case' . DS;
     $suite->addTestDirectory($path . 'Lib');
     return $suite;
 }
开发者ID:saydulk,项目名称:croogo,代码行数:7,代码来源:AllExtensionsTestsTest.php

示例13: setUp

 /**
  * setUp method
  */
 public function setUp()
 {
     parent::setUp();
     App::build(array('Plugin' => array(CakePlugin::path('Migrations') . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), APP::RESET);
     $this->connection = 'test';
     $this->Migrations = new Migrations($this->connection);
 }
开发者ID:frankfoerster,项目名称:cakephp-migrations,代码行数:10,代码来源:MigrationsTest.php

示例14: getAssetFile

 /**
  * Builds asset file path based off url
  *
  * @param string $url
  * @return string Absolute path for asset file
  */
 static function getAssetFile($url)
 {
     $parts = explode('/', $url);
     if ($parts[0] === 'theme') {
         $file = '';
         $fileFragments = explode(',', $url);
         $fileNumber = count($fileFragments);
         foreach ($fileFragments as $k => $fileFragment) {
             $fileParts = explode('/', $fileFragment);
             unset($fileParts[0], $fileParts[1]);
             if ($fileNumber == $k + 1) {
                 $file .= urldecode(implode(DS, $fileParts));
             } else {
                 $file .= urldecode(implode(DS, $fileParts)) . ',';
             }
         }
         $themeName = $parts[1];
         $path = Configure::read('App.www_root') . 'theme' . DS . $themeName;
         if (!file_exists($path)) {
             $path = App::themePath($themeName) . 'webroot';
         }
         return array($path, $file);
     }
     $plugin = Inflector::camelize($parts[0]);
     if (CakePlugin::loaded($plugin)) {
         unset($parts[0]);
         $fileFragment = urldecode(implode(DS, $parts));
         $pluginWebroot = CakePlugin::path($plugin) . 'webroot';
         return array($pluginWebroot, $fileFragment);
     } else {
         return array(WWW_ROOT, $_GET['f']);
     }
 }
开发者ID:vijaychirivolu,项目名称:aW5zdGl0dXRlcyajiv,代码行数:39,代码来源:Asset.php

示例15: suite

 public static function suite()
 {
     $suite = new CakeTestSuite('All Acl component class tests');
     $path = CakePlugin::path('Acl') . DS . 'Test' . DS . 'Case';
     $suite->addTestDirectory($path . DS . 'Controller' . DS . 'Component');
     return $suite;
 }
开发者ID:saydulk,项目名称:croogo,代码行数:7,代码来源:AllAclComponentsTest.php


注:本文中的CakePlugin::path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。