PageRenderTime 41ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/Cake/Console/Templates/skel/webroot/test.php

https://bitbucket.org/udeshika/fake_twitter
PHP | 94 lines | 38 code | 9 blank | 47 comment | 12 complexity | b65c4def88bf9640692cf665ef9d3dbb MD5 | raw file
  1. <?php
  2. /**
  3. * Web Access Frontend for TestSuite
  4. *
  5. * PHP 5
  6. *
  7. * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
  8. * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
  9. *
  10. * Licensed under The MIT License
  11. * Redistributions of files must retain the above copyright notice
  12. *
  13. * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
  14. * @link http://book.cakephp.org/view/1196/Testing
  15. * @package app.webroot
  16. * @since CakePHP(tm) v 1.2.0.4433
  17. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  18. */
  19. set_time_limit(0);
  20. ini_set('display_errors', 1);
  21. /**
  22. * Use the DS to separate the directories in other defines
  23. */
  24. if (!defined('DS')) {
  25. define('DS', DIRECTORY_SEPARATOR);
  26. }
  27. /**
  28. * These defines should only be edited if you have cake installed in
  29. * a directory layout other than the way it is distributed.
  30. * When using custom settings be sure to use the DS and do not add a trailing DS.
  31. */
  32. /**
  33. * The full path to the directory which holds "app", WITHOUT a trailing DS.
  34. *
  35. */
  36. if (!defined('ROOT')) {
  37. define('ROOT', dirname(dirname(dirname(__FILE__))));
  38. }
  39. /**
  40. * The actual directory name for the "app".
  41. *
  42. */
  43. if (!defined('APP_DIR')) {
  44. define('APP_DIR', basename(dirname(dirname(__FILE__))));
  45. }
  46. /**
  47. * The absolute path to the "Cake" directory, WITHOUT a trailing DS.
  48. *
  49. * For ease of development CakePHP uses PHP's include_path. If you
  50. * need to cannot modify your include_path, you can set this path.
  51. *
  52. * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
  53. */
  54. //define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
  55. /**
  56. * Editing below this line should not be necessary.
  57. * Change at your own risk.
  58. *
  59. */
  60. if (!defined('WEBROOT_DIR')) {
  61. define('WEBROOT_DIR', basename(dirname(__FILE__)));
  62. }
  63. if (!defined('WWW_ROOT')) {
  64. define('WWW_ROOT', dirname(__FILE__) . DS);
  65. }
  66. if (!defined('CAKE_CORE_INCLUDE_PATH')) {
  67. if (function_exists('ini_set')) {
  68. ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
  69. }
  70. if (!include('Cake' . DS . 'bootstrap.php')) {
  71. $failed = true;
  72. }
  73. } else {
  74. if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) {
  75. $failed = true;
  76. }
  77. }
  78. if (!empty($failed)) {
  79. 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);
  80. }
  81. if (Configure::read('debug') < 1) {
  82. die(__d('cake_dev', 'Debug setting does not allow access to this url.'));
  83. }
  84. require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
  85. CakeTestSuiteDispatcher::run();