diff --git a/ext/alias_editor/test.php b/ext/alias_editor/test.php index 3433edde..a69e5706 100644 --- a/ext/alias_editor/test.php +++ b/ext/alias_editor/test.php @@ -8,7 +8,7 @@ class AliasEditorTest extends ShimmieWebTestCase { $this->log_in_as_user(); $this->get_page('alias/list'); $this->assert_title("Alias List"); - $this->assertFalse($this->assertFieldByName('oldtag', '')); + $this->assert_no_text("Add"); $this->log_out(); $this->log_in_as_admin(); diff --git a/ext/simpletest/main.php b/ext/simpletest/main.php index 9d6bf18f..afd3b372 100644 --- a/ext/simpletest/main.php +++ b/ext/simpletest/main.php @@ -110,15 +110,11 @@ class SCoreWebTestCase extends WebTestCase { * the right thing; no need for http:// or any such */ protected function get_page($page) { - if($_SERVER['HTTP_HOST'] == "") { - - //print "http://127.0.0.1/2.Xm/index.php?q=$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)); + // Check if we are running on the command line + if(php_sapi_name() === 'cli' || $_SERVER['HTTP_HOST'] == "") { + $host = rtrim(trim(constant("_TRAVIS_WEBHOST")), "/"); + $this->assertFalse(empty($host)); // Make sure that we know the host address. + $raw = $this->get($host."/index.php?q=".str_replace("?", "&", $page)); } else { $raw = $this->get(make_http(make_link($page)));