$route =
new Route('/'
);
$route->
setHost('{locale}.example.net'
);
$this->
assertEquals('{locale}.example.net',
$route->
getHost(), '->setHost() sets the host pattern'
);
} public function testScheme() { $route =
new Route('/'
);
$this->
assertEquals([],
$route->
getSchemes(), 'schemes is initialized with []'
);
$this->
assertFalse($route->
hasScheme('http'
));
$route->
setSchemes('hTTp'
);
$this->
assertEquals(['http'
],
$route->
getSchemes(), '->setSchemes() accepts a single scheme string and lowercases it'
);
$this->
assertTrue($route->
hasScheme('htTp'
));
$this->
assertFalse($route->
hasScheme('httpS'
));
$route->
setSchemes(['HttpS', 'hTTp'
]);
$this->
assertEquals(['https', 'http'
],
$route->
getSchemes(), '->setSchemes() accepts an array of schemes and lowercases them'
);
$this->
assertTrue($route->
hasScheme('htTp'
));
$this->
assertTrue($route->
hasScheme('httpS'
));
} public function testMethod() {