public function testToWebFormatWithToName() { $email = new Email(); $email->addTo('*****@*****.**', 'Frank Foo'); $email->setFrom('*****@*****.**'); $json = $email->toWebFormat(); $this->assertEquals($json['toname'], array('Frank Foo')); }