]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - tests/data/Bug40739Test.php
Added unit tests.
[Github/sugarcrm.git] / tests / data / Bug40739Test.php
1 <?php
2
3 class Bug40739Test extends Sugar_PHPUnit_Framework_TestCase
4 {
5     protected $contact;
6     
7     public function setUp()
8     {
9         $this->contact = SugarTestContactUtilities::createContact();
10         }
11         
12         public function tearDown()
13         {
14             SugarTestContactUtilities::removeAllCreatedContacts();
15         }
16         
17     /*
18      * @group bug40739
19      */
20     public function testCreatedByNameOverride()
21     {
22         $this->contact->created_by = '';
23         $this->contact->created_by_name = 'admin';
24         $this->contact->fill_in_additional_detail_fields();
25         
26         $this->assertTrue($this->contact->created_by_name == 'admin', "created_by_name shouldn't have been affected by a blank created_by value");
27     }
28 }