public function testGetOwnersNamesReturnsAlistOfAllTenantNamesJoinedWithSeparator() { $owner1 = $this->getMock('Client', ['getFullName']); $owner1->expects($this->exactly(2))->method('getFullName')->will($this->returnValue('John Smith')); $owner2 = $this->getMock('Client', ['getFullName']); $owner2->expects($this->exactly(2))->method('getFullName')->will($this->returnValue('Jane Smith')); $model = new Deal(); $model->tenant = [$owner1, $owner2]; $this->assertEquals('John Smith, Jane Smith', $model->getTenantNames()); $this->assertEquals('John Smith<br>Jane Smith', $model->getTenantNames('<br>')); }