public function testToArray() { $authors = new Authors(); $authors[] = new Author('James Bond <*****@*****.**>'); $authors[] = new Author('Indiana Jones <*****@*****.**>'); $this->assertSame([['name' => 'James Bond', 'email' => '*****@*****.**'], ['name' => 'Indiana Jones', 'email' => '*****@*****.**']], $authors->toArray()); }