public function testIsShort()
 {
     $field = AttachmentField::fromData(['short' => $this->faker->boolean]);
     $this->assertEquals($field->data['short'], $field->isShort());
 }
Beispiel #2
0
 /**
  * {@inheritDoc}
  */
 public function jsonUnserialize(array $data)
 {
     if (!isset($this->data['fields'])) {
         return;
     }
     for ($i = 0; $i < count($this->data['fields']); $i++) {
         $this->data['fields'][$i] = AttachmentField::fromData($this->data['fields'][$i]);
     }
 }