diff --git a/tests/PHPStan/Rules/Debug/DumpNativeTypeRuleTest.php b/tests/PHPStan/Rules/Debug/DumpNativeTypeRuleTest.php new file mode 100644 index 0000000000..71aba72e45 --- /dev/null +++ b/tests/PHPStan/Rules/Debug/DumpNativeTypeRuleTest.php @@ -0,0 +1,33 @@ + + */ +class DumpNativeTypeRuleTest extends RuleTestCase +{ + + protected function getRule(): Rule + { + return new DumpNativeTypeRule(self::createReflectionProvider()); + } + + public function testRule(): void + { + $this->analyse([__DIR__ . '/data/dump-native-type.php'], [ + [ + 'Dumped type: non-empty-array', + 11, + ], + [ + 'Dumped type: array', + 12, + ], + ]); + } + +} diff --git a/tests/PHPStan/Rules/Debug/data/dump-native-type.php b/tests/PHPStan/Rules/Debug/data/dump-native-type.php new file mode 100644 index 0000000000..e475cf1aef --- /dev/null +++ b/tests/PHPStan/Rules/Debug/data/dump-native-type.php @@ -0,0 +1,13 @@ +