Esempio n. 1
0
 public function testCustomRelatedLink()
 {
     $layout_def = array('name' => 'account_id_c', 'label' => 'Account Link', 'table_key' => 'self', 'table_alias' => 'opportunities_cstm', 'column_key' => 'self:account_link_c', 'type' => 'relate', 'fields' => array('PRIMARYID' => '10765534-ff52-52ec-5840-4f16faec901f', 'OPPORTUNITIES_NAME' => 'Trait Institute Inc - 1000 units', 'OPPORTUNITIES_AMOUNT_UBC8F31' => '52183382.29', 'OPPORTUNITIES_AMOUNT' => '52183382.29', 'OPPORTUNITIES_AMOUNT_C9AC638' => '-99', 'OPPORTUNITIES_CSTM_ACCE36316' => '13ce632e-605e-93ac-c209-4f16fa14e616', 'ACCOUNTS1_NAME' => 'OTC Holdings'));
     $fakeLayoutManager = new Bug45716Helper();
     $sugarWidget = new SugarWidgetFieldrelate($fakeLayoutManager);
     $output = $sugarWidget->displayList($layout_def);
     $this->assertContains('record=13ce', $output, 'Missing the id in the output url');
 }