public function testAccessors() { $participant = new Participant('*****@*****.**'); $this->assertCount(1, $participant->toArray()); $this->assertEquals('*****@*****.**', $participant->getLabel()); $participant = Participant::fromArray(['label' => '*****@*****.**', 'moo' => 1, 'moo2' => 2]); $this->assertCount(3, $participant->toArray()); $this->assertEquals(1, $participant->get('moo')); }
public static function fromArray(array $data) { return new self(Participant::fromArray($data['participant']), $data['role']); }