remote_test.php 738B

1234567891011121314151617181920
  1. <?php
  2. // $Id: remote_test.php 1759 2008-04-15 02:37:07Z edwardzyang $
  3. require_once('../remote.php');
  4. require_once('../reporter.php');
  5. // The following URL will depend on your own installation.
  6. if (isset($_SERVER['SCRIPT_URI'])) {
  7. $base_uri = $_SERVER['SCRIPT_URI'];
  8. } elseif (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['PHP_SELF'])) {
  9. $base_uri = 'http://'. $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
  10. };
  11. $test_url = str_replace('remote_test.php', 'visual_test.php', $base_uri);
  12. $test = new TestSuite('Remote tests');
  13. $test->add(new RemoteTestCase($test_url . '?xml=yes', $test_url . '?xml=yes&dry=yes'));
  14. if (SimpleReporter::inCli()) {
  15. exit ($test->run(new TextReporter()) ? 0 : 1);
  16. }
  17. $test->run(new HtmlReporter());