/**
  * @param array $data
  * @param SchoolInterface $entity
  */
 protected function assertDataEquals(array $data, $entity)
 {
     // `school_id`,`template_prefix`,`title`,`ilios_administrator_email`,`change_alert_recipients`
     $this->assertEquals($data[0], $entity->getId());
     $this->assertEquals($data[1], $entity->getTemplatePrefix());
     $this->assertEquals($data[2], $entity->getTitle());
     $this->assertEquals($data[3], $entity->getIliosAdministratorEmail());
     $this->assertEquals($data[4], $entity->getChangeAlertRecipients());
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function userHasWritePermissionToSchool(UserInterface $user, SchoolInterface $school)
 {
     return $this->userHasPermission($user, self::CAN_WRITE, 'school', $school->getId());
 }
Beispiel #3
0
 /**
  * Checks if two given schools are the same.
  * @param SchoolInterface|null $schoolA
  * @param SchoolInterface|null $schoolB
  * @return bool
  */
 public function schoolsAreIdentical(SchoolInterface $schoolA = null, SchoolInterface $schoolB = null)
 {
     return $schoolA instanceof SchoolInterface && $schoolB instanceof SchoolInterface && $schoolA->getId() === $schoolB->getId();
 }