Example #1
0
 public function testContentLocationCanSetAndAccessRelativeUri()
 {
     $contentLocationHeader = ContentLocation::fromString('Content-Location: /path/to');
     $uri = $contentLocationHeader->uri();
     $this->assertInstanceOf('Zend\\Uri\\UriInterface', $uri);
     $this->assertFalse($uri->isAbsolute());
     $this->assertEquals('/path/to', $contentLocationHeader->getUri());
 }
Example #2
0
 public function testContentLocationFromStringCreatesValidContentLocationHeader()
 {
     $contentLocationHeader = ContentLocation::fromString('Content-Location: xxx');
     $this->assertInstanceOf('Zend\Http\Header\HeaderInterface', $contentLocationHeader);
     $this->assertInstanceOf('Zend\Http\Header\ContentLocation', $contentLocationHeader);
 }