Example #1
0
 public function testParseScopeWithAbsoluteAttachmentUsingVariables()
 {
     $request = new Request(array('env' => array('HTTP_HOST' => 'www.amiga.com', 'HTTPS' => false, 'DOCUMENT_ROOT' => '/var/www', 'PHP_SELF' => '/var/www/index.php', 'REQUEST_URI' => '/')));
     Router::attach('app', array('absolute' => true, 'host' => '{:subdomain}.atari.{:tld}', 'scheme' => 'http', 'prefix' => ''));
     $result = Router::invokeMethod('_parseScope', array('app', $request));
     $this->assertFalse($result);
     $request = new Request(array('env' => array('HTTP_HOST' => 'www.amiga.com', 'HTTPS' => false, 'DOCUMENT_ROOT' => '/var/www', 'PHP_SELF' => '/var/www/index.php', 'REQUEST_URI' => '/')));
     Router::attach('app', array('absolute' => true, 'host' => '{:subdomain}.amiga.{:tld}', 'scheme' => 'http', 'prefix' => ''));
     $result = Router::invokeMethod('_parseScope', array('app', $request));
     $this->assertIdentical('/', $result);
 }