]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - tests/modules/DynamicFields/Bug39766Test.php
Added unit tests.
[Github/sugarcrm.git] / tests / modules / DynamicFields / Bug39766Test.php
1 <?php
2 require_once('modules/DynamicFields/FieldCases.php');
3
4
5 class Bug39766Test extends Sugar_PHPUnit_Framework_TestCase
6 {
7     /**
8      * @group bug35265
9      */    
10     public function testFloatPrecisionMapping()
11     {
12         $_REQUEST = array('precision' => 2, 'type' => 'float');
13         require_once ('modules/DynamicFields/FieldCases.php') ;
14         $field = get_widget ( $_REQUEST [ 'type' ] ) ;
15         $field->populateFromPost () ;
16         
17         $this->assertEquals($field->ext1, 2, 'Asserting that the ext1 value was set to the proper precision');
18         $this->assertEquals($field->precision, 2, 'Asserting that the precision value was set to the proper precision');
19     }
20 }