The location of the webserver should be configurable in the travis file.

This commit is contained in:
jgen
2014-02-19 03:29:12 -05:00
parent cb135d4763
commit 8b0ac0e9c1
4 changed files with 24 additions and 6 deletions

View File

@@ -111,10 +111,14 @@ class SCoreWebTestCase extends WebTestCase {
*/
protected function get_page($page) {
if($_SERVER['HTTP_HOST'] == "<cli command>") {
// FIXME: this should be a command line option.
//print "http://127.0.0.1/2.Xm/index.php?q=$page";
$raw = $this->get("http://127.0.0.1/index.php?q=".str_replace("?", "&", $page));
$host = constant("_TRAVIS_WEBHOST");
// Make sure that we know where the host is.
$this->assertFalse(empty($host));
$raw = $this->get($host."index.php?q=".str_replace("?", "&", $page));
}
else {
$raw = $this->get(make_http(make_link($page)));