19 declare(strict_types=1);
32 protected function setUp(): void
37 #[DataProvider('IntegerTestDataProvider')] 40 $transformedValue = $this->transformation->transform($originVal);
41 $this->assertIsInt($transformedValue);
42 $this->assertEquals($expectedVal, $transformedValue);
45 #[DataProvider('TransformationFailureDataProvider')] 48 $this->expectException(ConstraintViolationException::class);
49 $this->transformation->transform($failingValue);
55 'pos_bool' => [
true, 1],
56 'neg_bool' => [
false, 0],
57 'float_val' => [20.5, 21],
58 'float_val_round_up' => [0.51, 1],
59 'float_val_round_down' => [0.49, 0],
60 'string_zero' => [
'0', 0],
61 'string_val' => [
'4947642', 4947642],
62 'neg_string_val' => [
'-4947642', -4947642],
63 'string_val_trimming' => [
' 4947642 ', 4947642],
64 'neg_string_val_trimming' => [
' -4947642 ', -4947642],
71 'bigger_than_int_max' => [
"9223372036854775808"],
72 'smaller_than_int_min' => [
"-9223372036854775809"],
73 'weird_notation' => [
"01"],
75 'mill_delim' => [
"1'000"],
78 'written_false' => [
'false'],
79 'written_null' => [
'null'],
81 'written_NaN' => [
'NaN'],
84 'written_INF' => [
'INF'],
85 'written_neg_INF' => [
'-INF'],
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null