Skip to content

Commit

Permalink
add RiskyCast tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Sep 20, 2022
1 parent d69be4b commit d69e062
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/ToStringTest.php
Expand Up @@ -517,6 +517,16 @@ function __toString(): string {
echo (int) $foo;',
'error_message' => 'InvalidCast',
],
'riskyArrayToIntCast' => [
'<?php
echo (int) array();',
'error_message' => 'RiskyCast',
],
'riskyArrayToFloatCast' => [
'<?php
echo (float) array(\'hello\');',
'error_message' => 'RiskyCast',
],
];
}
}

0 comments on commit d69e062

Please sign in to comment.