qunit.php 519 B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * @file
  4. * Dummy PHP file that bootstraps the Drupal administration page to work around
  5. * a QUnit bug where we can't have ?q=... in the URL.
  6. */
  7. $script_name = $_SERVER['SCRIPT_NAME'];
  8. $script_parts = explode('/', $script_name);
  9. array_pop($script_parts);
  10. while (!file_exists('./index.php')) {
  11. chdir('..');
  12. array_pop($script_parts);
  13. }
  14. $_SERVER['SCRIPT_NAME'] = implode('/', $script_parts) . '/index.php';
  15. $_GET['q'] = 'admin/config/development/qunit';
  16. $qunit_hack = TRUE;
  17. require_once('./index.php');