/** * Test Resource::operationAllowed(). */ public function testGetLink() { $this->assertNotEmpty($this->resource->getLink('self')); $this->assertNotEmpty($this->resource->getLink('#operate')); $this->setExpectedException('\\InvalidArgumentException'); $this->resource->getLink('nonexistent'); }
/** * @inheritdoc */ public function getLink($rel, $absolute = false) { if ($rel === '#edit') { return $this->getUri($absolute); } return parent::getLink($rel, $absolute); }