Base for a static organization website

test.php 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * Web Access Frontend for TestSuite
  4. *
  5. * @link http://book.cakephp.org/2.0/en/development/testing.html
  6. * @package app.webroot
  7. * @since CakePHP(tm) v 1.2.0.4433
  8. */
  9. set_time_limit(0);
  10. ini_set('display_errors', 1);
  11. /**
  12. * Use the DS to separate the directories in other defines
  13. */
  14. if (!defined('DS')) {
  15. define('DS', DIRECTORY_SEPARATOR);
  16. }
  17. /**
  18. * These defines should only be edited if you have CakePHP installed in
  19. * a directory layout other than the way it is distributed.
  20. * When using custom settings be sure to use the DS and do not add a trailing DS.
  21. */
  22. /**
  23. * The full path to the directory which holds "app", WITHOUT a trailing DS.
  24. */
  25. if (!defined('ROOT')) {
  26. define('ROOT', dirname(dirname(dirname(__FILE__))));
  27. }
  28. /**
  29. * The actual directory name for the "app".
  30. */
  31. if (!defined('APP_DIR')) {
  32. define('APP_DIR', basename(dirname(dirname(__FILE__))));
  33. }
  34. /**
  35. * The absolute path to the "Cake" directory, WITHOUT a trailing DS.
  36. *
  37. * For ease of development CakePHP uses PHP's include_path. If you
  38. * need to cannot modify your include_path, you can set this path.
  39. *
  40. * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
  41. *
  42. * The following line differs from its sibling
  43. * /app/webroot/test.php
  44. */
  45. define('CAKE_CORE_INCLUDE_PATH', DS . 'home' . DS . 'kod3' . DS . 'work' . DS . 'vitrine' . DS . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib');
  46. /**
  47. * This auto-detects CakePHP as a composer installed library.
  48. * You may remove this if you are not planning to use composer (not recommended, though).
  49. */
  50. $vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
  51. $dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
  52. if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
  53. define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
  54. }
  55. /**
  56. * Editing below this line should not be necessary.
  57. * Change at your own risk.
  58. */
  59. if (!defined('WEBROOT_DIR')) {
  60. define('WEBROOT_DIR', basename(dirname(__FILE__)));
  61. }
  62. if (!defined('WWW_ROOT')) {
  63. define('WWW_ROOT', dirname(__FILE__) . DS);
  64. }
  65. if (!defined('CAKE_CORE_INCLUDE_PATH')) {
  66. if (function_exists('ini_set')) {
  67. ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
  68. }
  69. if (!include 'Cake' . DS . 'bootstrap.php') {
  70. $failed = true;
  71. }
  72. } else {
  73. if (!include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php') {
  74. $failed = true;
  75. }
  76. }
  77. if (!empty($failed)) {
  78. 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);
  79. }
  80. if (Configure::read('debug') < 1) {
  81. throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this URL.'));
  82. }
  83. require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
  84. CakeTestSuiteDispatcher::run();