public function testRenderContent()
 {
     $account = AccountTestHelper::createAccountByNameForOwner('testAccount', Yii::app()->user->userModel);
     $accountCardViewLayout = new AccountCardViewLayout($account);
     $this->assertContains('testAccount', $accountCardViewLayout->renderContent());
     $this->assertNotContains('123-345-789', $accountCardViewLayout->renderContent());
     $this->assertNotContains('rua que sobe e que desce', $accountCardViewLayout->renderContent());
     //Creating phone and address
     $address = new Address();
     $address->street1 = 'rua que sobe e que desce';
     $account->officePhone = '123-345-789';
     $account->billingAddress = $address;
     $this->assertTrue($account->save());
     $this->assertContains('testAccount', $accountCardViewLayout->renderContent());
     $this->assertContains('123-345-789', $accountCardViewLayout->renderContent());
     $this->assertContains('rua que sobe e que desce', $accountCardViewLayout->renderContent());
 }
 protected function renderDetailsViewForDupeModel($model)
 {
     $content = null;
     if ($model instanceof User || $model instanceof Person) {
         $layout = new PersonCardViewLayout($model, true);
     } elseif ($model instanceof Account) {
         $layout = new AccountCardViewLayout($model, true);
     } else {
         throw new NotSupportedException();
     }
     $content = $layout->renderContent();
     $content .= $this->renderActivitiesTotals($model);
     return $content;
 }