Пример #1
0
 /**
  * @test
  */
 public function it_extracts_properties()
 {
     $httpClient = new RecordingHttpClient();
     $client = new HalClient('http://propilex.herokuapp.com', $httpClient);
     $link = new HalLink($client, '/documents{?page,limit}', true, 'application/hal+json', 'http://example.com/deprecation', 'name', 'http://example.com/profile', 'title', 'en');
     $this->assertSame('/documents?page=1&limit=10', $link->getUri($this->variables));
     $this->assertSame('/documents{?page,limit}', $link->getHref());
     $this->assertSame(true, $link->getTemplated());
     $this->assertSame('application/hal+json', $link->getType());
     $this->assertSame('http://example.com/deprecation', $link->getDeprecation());
     $this->assertSame('name', $link->getName());
     $this->assertSame('http://example.com/profile', $link->getProfile());
     $this->assertSame('title', $link->getTitle());
     $this->assertSame('en', $link->getHreflang());
 }