/** * @param array $data * @param MeshDescriptorInterface $entity */ protected function assertDataEquals(array $data, $entity) { // `mesh_concept_uid`,`mesh_descriptor_uid` $this->assertEquals($data[1], $entity->getId()); // find the concept $conceptId = $data[0]; $concept = $entity->getConcepts()->filter(function (MeshConceptInterface $concept) use($conceptId) { return $concept->getId() === $conceptId; })->first(); $this->assertNotEmpty($concept); }