Beispiel #1
0
 public function testIssue()
 {
     if ($this->locale === false) {
         $this->markTestSkipped('The test locale could not be set.');
     }
     ILess_Math::setup();
     ILess_UnitConversion::setup();
     $this->assertEquals(array('rad' => '0.1591549430918953', 'deg' => '0.0027777777777777', 'grad' => '0.0025000000000000', 'turn' => '1'), ILess_UnitConversion::$angle, 'The math setup works');
 }
Beispiel #2
0
 /**
  * Restores the state of precision setting
  *
  */
 public static function restore()
 {
     if (self::$oldPrecision !== null && function_exists('ini_set')) {
         ini_set('precision', self::$oldPrecision[0]);
         ini_set('bcmath.scale', self::$oldPrecision[1]);
         bcscale(self::$oldPrecision[1]);
     }
     self::$setup = false;
 }
Beispiel #3
0
 public function setUp()
 {
     $this->registry = new ILess_FunctionRegistry(array(), new ILess_Environment());
     ILess_Math::setup();
 }
Beispiel #4
0
 /**
  * Setup the math precision
  *
  * @return void
  */
 private function setupMathAndLocale()
 {
     ILess_Math::setup($this->env->precision);
     ILess_UnitConversion::setup();
 }
Beispiel #5
0
 public function setUp()
 {
     // we need the precision setup
     ILess_Math::setup(16);
 }
Beispiel #6
0
 public function __construct(ILess_Environment $env, ILess_Importer $importer)
 {
     parent::__construct($env, $importer);
     ILess_Math::setup(16);
     ILess_UnitConversion::setup();
 }