Skip to content

Commit c38310f

Browse files
Merge branch '7.3' into 7.4
* 7.3: [SecurityBundle] Remove legacy parameter in SecurityDataCollectorTest Fix incorrect serialized data mangling [Console] Specify types of interactive question choices Prevent duplicate entries in module preloads [Validator] Expression constraint docblock incorrectly states default value for negate [ObjectMapper] Preserve non-promoted constructor parameters prefer the public API over reflection in test
2 parents 9e21912 + 7b3eee0 commit c38310f

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ public function testReverseTransformDoesNotCauseIntegerPrecisionLoss()
714714
$this->markTestSkipped('Test is not applicable on 32-bit systems where no integer loses precision when cast to float.');
715715
}
716716

717-
$transformer = new NumberToLocalizedStringTransformer();
717+
$transformer = new NumberToLocalizedStringTransformer(2);
718718

719719
// Test a large integer that causes actual precision loss when cast to float
720720
$largeInt = \PHP_INT_MAX - 1; // This value loses precision when cast to float
@@ -723,24 +723,4 @@ public function testReverseTransformDoesNotCauseIntegerPrecisionLoss()
723723
$this->assertSame($largeInt, $result);
724724
$this->assertIsInt($result);
725725
}
726-
727-
public function testRoundMethodKeepsIntegersAsIntegers()
728-
{
729-
if (\PHP_INT_SIZE === 4) {
730-
$this->markTestSkipped('Test is not applicable on 32-bit systems where no integer loses precision when cast to float.');
731-
}
732-
733-
$transformer = new NumberToLocalizedStringTransformer(2); // scale=2 triggers rounding
734-
735-
// Use reflection to test the private round() method directly
736-
$reflection = new \ReflectionClass($transformer);
737-
$roundMethod = $reflection->getMethod('round');
738-
739-
$int = \PHP_INT_MAX - 1;
740-
$result = $roundMethod->invoke($transformer, $int);
741-
742-
// With the fix, integers should stay as integers, not be converted to floats
743-
$this->assertSame($int, $result);
744-
$this->assertIsInt($result);
745-
}
746726
}

0 commit comments

Comments
 (0)