Пример #1
0
 public function testImportanceGetterAndSetter()
 {
     $entity = new Email();
     $entity->setImportance(1);
     $this->assertEquals(1, $entity->getImportance());
 }
Пример #2
0
 /**
  * @param Email  $email
  * @param string $importance
  */
 protected function processImportance(Email $email, $importance)
 {
     if ($email->getId()) {
         if ($email->getImportance() != $importance) {
             throw $this->createInvalidPropertyException('Importance', $this->emailImportanceTransformer->transform($email->getImportance()), $this->emailImportanceTransformer->transform($importance));
         }
     } else {
         $email->setImportance($importance);
     }
 }