File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66<div class =" body" >
77 <div class =" full-name" >{{ contact.fullName }} </div >
88 <div class =" last-message" >{{ contact.lastMessage }} </div >
9+ <div class =" email-address" >{{ contact.emailAddresses }} </div >
910</div >
1011{{ #if contact.topAction }}
1112<a class =" top-action" href =" {{ contact.topAction.hyperlink }} " title =" {{ contact.topAction.title }} " >
Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ public function jsonSerialize(): array {
165165 'topAction ' => $ topAction ,
166166 'actions ' => $ otherActions ,
167167 'lastMessage ' => '' ,
168+ 'emailAddresses ' => $ this ->getEMailAddresses (),
168169 ];
169170 }
170171}
Original file line number Diff line number Diff line change @@ -96,16 +96,18 @@ public function testSetGetProperties() {
9696
9797 public function testJsonSerialize () {
9898 $ expectedJson = [
99- 'id ' => 123 ,
99+ 'id ' => ' 123 ' ,
100100 'fullName ' => 'Guadalupe Frisbey ' ,
101101 'topAction ' => null ,
102102 'actions ' => [],
103103 'lastMessage ' => '' ,
104104 'avatar ' => null ,
105+ 'emailAddresses ' => ['user@example.com ' ]
105106 ];
106107
107108 $ this ->entry ->setId (123 );
108109 $ this ->entry ->setFullName ('Guadalupe Frisbey ' );
110+ $ this ->entry ->addEMailAddress ('user@example.com ' );
109111 $ json = $ this ->entry ->jsonSerialize ();
110112
111113 $ this ->assertEquals ($ expectedJson , $ json );
You can’t perform that action at this time.
0 commit comments