]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - tests/modules/Notes/Bug44138Test.php
Release 6.5.16
[Github/sugarcrm.git] / tests / modules / Notes / Bug44138Test.php
1 <?php
2 /*********************************************************************************
3  * By installing or using this file, you are confirming on behalf of the entity
4  * subscribed to the SugarCRM Inc. product ("Company") that Company is bound by
5  * the SugarCRM Inc. Master Subscription Agreement (“MSA”), which is viewable at:
6  * http://www.sugarcrm.com/master-subscription-agreement
7  *
8  * If Company is not bound by the MSA, then by installing or using this file
9  * you are agreeing unconditionally that Company will be bound by the MSA and
10  * certifying that you have authority to bind Company accordingly.
11  *
12  * Copyright (C) 2004-2013 SugarCRM Inc.  All rights reserved.
13  ********************************************************************************/
14
15 require_once('include/SubPanel/SubPanelDefinitions.php');
16
17 class Bug44138Test extends Sugar_PHPUnit_Framework_TestCase
18 {
19     protected $contact;
20
21     public function setUp()
22     {
23         SugarTestHelper::setUp('beanFiles');
24         SugarTestHelper::setUp('beanList');
25         SugarTestHelper::setUp('current_user');
26         $this->contact = SugarTestContactUtilities::createContact();
27     }
28
29     public function tearDown()
30     {
31         SugarTestContactUtilities::removeAllCreatedContacts();
32         SugarTestHelper::tearDown();
33     }
34
35     
36     public function testHistorySubpanel()
37     {
38         $subpanelDefs = new SubPanelDefinitions($this->contact);
39         $subpanel = $subpanelDefs->load_subpanel('history');
40         $prop = $subpanel->get_inst_prop_value('collection_list');
41
42         $this->assertArrayHasKey('notes_parent', $prop, 'Should have notes_parent key defined for history');
43     }
44 }