示例#1
0
 public function testGetLinkHrefReturnsNullIfRelNotFound()
 {
     $linkHelper = new LinkHelper($this->getLinkFactoryMock($this->never()), $this->getRelationsRepositoryMock());
     $this->assertNull($linkHelper->getLinkHref(new Will(123), 'unknown-rel'));
 }
示例#2
0
 /**
  * Gets the 'href' value of an object's link, identified by its rel name.
  *
  * @param object  $object
  * @param string  $rel
  * @param boolean $absolute
  *
  * @return string|null
  */
 public function getLinkHref($object, $rel, $absolute = false)
 {
     return $this->linkHelper->getLinkHref($object, $rel, $absolute);
 }