19 declare(strict_types=1);
32 protected function setUp(): void
37 #[DataProvider('FloatTestDataProvider')] 40 $transformedValue = $this->transformation->transform($originVal);
41 $this->assertIsFloat($transformedValue);
42 $this->assertEquals($expectedVal, $transformedValue);
45 #[DataProvider('FailingTransformationDataProvider')] 48 $this->expectNotToPerformAssertions();
50 $transformedValue = $this->transformation->transform($failingVal);
62 'written_false' => [
'false'],
63 'written_null' => [
'null'],
65 'written_NaN' => [
'NaN'],
68 'written_INF' => [
'INF'],
69 'written_neg_INF' => [
'-INF'],
70 'octal_notation1' => [
"01"],
71 'octal_notation2' => [
"-01"],
72 'mill_delim' => [
"1'000"],
73 'leading_dot' => [
".5"],
74 'leading_comma' => [
",661"]
81 'some_float' => [1.0, 1.0],
82 'pos_bool' => [
true, 1.0],
83 'neg_bool' => [
false, 0.0],
84 'string_comma' => [
'234,23', 234.23],
85 'neg_string_comma' => [
'-234,23', -234.23],
86 'neg_string_comma_trimming' => [
' -234,23 ', -234.23],
87 'string_point' => [
'234.23', 234.23],
88 'neg_string_point' => [
'-234.23', -234.23],
89 'neg_string_point_trimming' => [
' -234.23 ', -234.23],
90 'string_e_notation' => [
'7E10', 70000000000],
91 'string_e_notation_trimming' => [
' 7E10 ', 70000000000],
92 'neg_string_e_notation' => [
'-7E10', -70000000000],
93 'neg_string_e_notation_trimming' => [
' -7E10 ', -70000000000],
94 'int_val' => [23, 23.0],
95 'neg_int_val' => [-2, -2.0],
96 'zero_int' => [0, 0.0],
97 'zero_string' => [
"0", 0.0],
98 'float_st_one' => [0.1, 0.1],
99 'floatstr_st_one' => [
'0.1', 0.1],
100 'floatstr_st_one_negative' => [
'-0.1', -0.1],
101 'floatstr_st_one_comma' => [
'0,1', 0.1],
102 'floatstr_st_one_comma_negative' => [
'-0,1', -0.1]
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null