/** * @param array $data * @param VocabularyInterface $entity */ protected function assertDataEquals(array $data, $entity) { // `vocabulary_id`,`title`,`school_id`,`active` $this->assertEquals($data[0], $entity->getId()); $this->assertEquals($data[1], $entity->getTitle()); $this->assertEquals($data[2], $entity->getSchool()->getId()); $this->assertEquals((bool) $data[3], $entity->isActive()); }
/** * @param VocabularyInterface $entity * @param array $data * @return VocabularyInterface * * @see AbstractFixture::populateEntity() */ protected function populateEntity($entity, array $data) { // `vocabulary_id`,`title`,`school_id`, `active` $entity->setId($data[0]); $entity->setTitle($data[1]); $entity->setSchool($this->getReference('school' . $data[2])); $entity->setActive((bool) $data[3]); return $entity; }