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


PHP CakeTestSuiteDispatcher類代碼示例

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


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

示例1: testLoadTestFramework

 public function testLoadTestFramework()
 {
     $dispatcher = new CakeTestSuiteDispatcher();
     $this->assertTrue($dispatcher->loadTestFramework());
     $this->clearPaths();
     $exception = null;
     try {
         $dispatcher->loadTestFramework();
     } catch (Exception $ex) {
         $exception = $ex;
     }
     $this->assertEquals(get_class($exception), "PHPUnit_Framework_Error_Warning");
 }
開發者ID:beyondkeysystem,項目名稱:testone,代碼行數:13,代碼來源:CakeTestSuiteDispatcherTest.php

示例2: run

 /**
  * Static method to initialize the test runner, keeps global space clean
  *
  * @return void
  */
 public static function run()
 {
     $dispatcher = new CakeTestSuiteDispatcher();
     $dispatcher->dispatch();
 }
開發者ID:juliocp88,項目名稱:cakephp-example,代碼行數:10,代碼來源:CakeTestSuiteDispatcher.php

示例3: define

 * Editing below this line should not be necessary.
 * Change at your own risk.
 *
 */
if (!defined('WEBROOT_DIR')) {
    define('WEBROOT_DIR', basename(dirname(__FILE__)));
}
if (!defined('WWW_ROOT')) {
    define('WWW_ROOT', dirname(__FILE__) . DS);
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
    if (function_exists('ini_set')) {
        ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
    }
    if (!(include 'Cake' . DS . 'bootstrap.php')) {
        $failed = true;
    }
} else {
    if (!(include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) {
        $failed = true;
    }
}
if (!empty($failed)) {
    trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
if (Configure::read('debug') < 1) {
    throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this url.'));
}
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
CakeTestSuiteDispatcher::run();
開發者ID:dereuromark,項目名稱:cakephp-sandbox,代碼行數:30,代碼來源:test.php

示例4: dirname

	define('WWW_ROOT', dirname(__FILE__) . DS);
}
if (!defined('CORE_PATH')) {
	if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) {
		define('APP_PATH', null);
		define('CORE_PATH', null);
	} else {
		define('APP_PATH', ROOT . DS . APP_DIR . DS);
		define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
	}
}
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
	trigger_error("CakePHP core could not be found.  Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}

$corePath = App::core('cake');
if (isset($corePath[0])) {
	define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS);
} else {
	define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH);
}

if (Configure::read('debug') < 1) {
	die(__('Debug setting does not allow access to this url.', true));
}

require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php';

$Dispatcher = new CakeTestSuiteDispatcher();
$Dispatcher->dispatch();
開發者ID:eecian,項目名稱:Team08-iPeer,代碼行數:30,代碼來源:test.php

示例5: date

 /**
  * See CakeTestSuiteDispatcher::date()
  *
  * @param string $format format to be used.
  * @return string
  */
 public static function date($format = 'Y-m-d H:i:s')
 {
     return CakeTestSuiteDispatcher::date($format);
 }
開發者ID:Demired,項目名稱:CakeWX,代碼行數:10,代碼來源:CakeTestCase.php

示例6: _runTestCase

 /**
  * Runs a test case file.
  *
  * @return void
  */
 function _runTestCase()
 {
     $Reporter =& CakeTestSuiteDispatcher::getReporter();
     if ($this->params['codeCoverage']) {
         CodeCoverageManager::init($this->params['case'], $Reporter);
     }
     $this->Manager->runTestCase($this->params['case'], $Reporter);
 }
開發者ID:sathishkumarb,項目名稱:HVMS,代碼行數:13,代碼來源:cake_test_suite_dispatcher.php

示例7: _runTestCase

 /**
  * Runs a test case file.
  *
  * @return void
  */
 function _runTestCase()
 {
     try {
         $Reporter = CakeTestSuiteDispatcher::getReporter();
         return $this->Manager->runTestCase($this->params['case'], $Reporter, $this->params['codeCoverage']);
     } catch (MissingConnectionException $exception) {
         ob_end_clean();
         $baseDir = $this->_baseDir;
         include CAKE_TESTS_LIB . 'templates' . DS . 'missing_conenction.php';
         exit;
     }
 }
開發者ID:no2key,項目名稱:Web-Framework-Benchmark,代碼行數:17,代碼來源:cake_test_suite_dispatcher.php

示例8: _checkXdebug

 /**
  * {@inheritdoc}
  *
  * @return void
  */
 protected function _checkXdebug()
 {
     if (!defined('HHVM_VERSION')) {
         parent::_checkXdebug();
     }
 }
開發者ID:imsamurai,項目名稱:cakephp-environment,代碼行數:11,代碼來源:HHVMTestSuiteDispatcher.php


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