Skip to content

Instantly share code, notes, and snippets.

@bwoodmansee
Last active December 11, 2015 02:38
Show Gist options
  • Save bwoodmansee/4531950 to your computer and use it in GitHub Desktop.
Save bwoodmansee/4531950 to your computer and use it in GitHub Desktop.
Brainstorming links for testing rest relations
/**
* InvitationsTest
*
* @Rest\Relation("self",
* href = ""
* )
* @Rest\Relation("http://hautelook.com/rels/returns/items",
* href = ""
* )
* @Rest\Relation("http://hautelook.com/rels/returns",
* href = ""
* )
* @Rest\Relation("http://hautelook.com/rels/shipping",
* href = ""
* )
* @Rest\Relation("http://hautelook.com/rels/members",
* href = ""
* )
*
* @author Brandon Woodmansee <brandon.woodmansee@hautelook.com>
*/
class InvitationsTest extends HautelookControllerTest
{
protected function getRelations() {
$relations = $this->getKernel()->getContainer()->get('fsc_hateoas.metadata.factory')->getMetadata($this);
foreach( $relations->getRelations() as $rel) {
$links[] = $rel->getRel();
}
return $links;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment