Esempio n. 1
0
 /**
  * @param Email  $email
  * @param string $refs
  */
 protected function processRefs(Email $email, $refs)
 {
     if ($email->getId()) {
         if (!$this->areRefsEqual($email->getRefs(), $refs)) {
             throw $this->createInvalidPropertyException('Refs', $this->convertRefsToString($email->getRefs()), $this->convertRefsToString($refs));
         }
     } else {
         $email->setRefs($refs);
     }
 }
Esempio n. 2
0
 /**
  * @dataProvider refsDataProvider
  * @param string $set
  * @param array $get
  */
 public function testRefsGetterAndSetter($set, $get)
 {
     $entity = new Email();
     $entity->setRefs($set);
     $this->assertEquals($get, $entity->getRefs());
 }