/** * @inheritDoc */ public function getResources() { $data = $this->get(self::DATA); if (!is_array($data)) { throw new RuntimeException('Data member is not an array.'); } return ResourceCollection::create($data); }
/** * @param ResourceCollection $resources * @depends testCreate */ public function testGetIds(ResourceCollection $resources) { $expected = [$this->resourceA()->getIdentifier(), $this->resourceB()->getIdentifier()]; $this->assertEquals(new ResourceIdentifierCollection($expected), $resources->getIdentifiers()); }