/** * @inheritdoc */ public function accept(ResourceIdentifierInterface $identifier, $record = null, $key = null, ResourceInterface $resource = null) { if (!$this->current) { return true; } return $this->current->getType() == $identifier->getType() && $this->current->getId() == $identifier->getId(); }
/** * @depends testMap */ public function testMapWithTypeConversion(ResourceIdentifierCollection $collection) { $a = 'Alias-A'; $b = 'Alias-B'; $map = [$this->a->getType() => $a, $this->b->getType() => $b]; $expected = [$a => [$this->a->getId()], $b => [$this->b->getId()]]; $this->assertEquals($expected, $collection->map($map)); }