Example #1
0
 /**
  * @test
  */
 public function evalCheckValueDouble2()
 {
     $testData = array('-0,5' => '-0.50', '1000' => '1000.00', '1000,10' => '1000.10', '1000,0' => '1000.00', '600.000.000,00' => '600000000.00', '60aaa00' => '6000.00');
     foreach ($testData as $value => $expectedReturnValue) {
         $returnValue = $this->subject->checkValue_input_Eval($value, array('double2'), '');
         $this->assertSame($returnValue['value'], $expectedReturnValue);
     }
 }
 /**
  * @test
  * @dataProvider dataProviderDatetime
  */
 public function evalCheckValueDatetime($input, $serverTimezone, $expectedOutput)
 {
     $oldTimezone = date_default_timezone_get();
     date_default_timezone_set($serverTimezone);
     $output = $this->subject->checkValue_input_Eval($input, ['datetime'], '');
     // set before the assertion is performed, so it is restored even for failing tests
     date_default_timezone_set($oldTimezone);
     $this->assertEquals($expectedOutput, $output['value']);
 }