public function testMatchHostWithParamDefaultAndRequisite() { $route = new Host("/"); $route->setHost("{subdomain}.example.com"); $route->setRequisite("subdomain", "en|bg"); $route->setDefault("subdomain", "en"); $this->assertTrue($route->matchHost("en.example.com")); $this->assertTrue($route->matchHost("bg.example.com")); $this->assertTrue($route->matchHost("example.com")); $this->assertFalse($route->matchHost("bg.www.example.com")); $this->assertFalse($route->matchHost("www.en.example.com")); $this->assertFalse($route->matchHost("sr.example.com")); }