/** */ public function test_domain_match() { $global = array('rules' => array(".*")); $loc = array('rules' => array("localhost\$")); $this->assertTrue(\System\Router::domain_match('http://localhost', $global)); $this->assertTrue(\System\Router::domain_match('http://localhost.com', $global)); $this->assertTrue(\System\Router::domain_match(null, $global)); $this->assertTrue(\System\Router::domain_match('http://localhost', $loc)); $this->assertTrue(\System\Router::domain_match('http://jebka.localhost', $loc)); $this->assertFalse(\System\Router::domain_match(null, $loc)); $this->assertFalse(\System\Router::domain_match('foo.bar', $loc)); $this->assertFalse(\System\Router::domain_match('jebka.localhost.com', $loc)); }