From 7ebba69df703000b5f05a79dba671515d30b8f05 Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Thu, 6 Aug 2020 08:14:25 +0000 Subject: [PATCH] checks that also testReturn1 and testReturn2 functions are marked as php 7.1 min (see GH-273) --- tests/Sniffs/ReturnTypeDeclarationSniffTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Sniffs/ReturnTypeDeclarationSniffTest.php b/tests/Sniffs/ReturnTypeDeclarationSniffTest.php index ad687918..a1b59b57 100644 --- a/tests/Sniffs/ReturnTypeDeclarationSniffTest.php +++ b/tests/Sniffs/ReturnTypeDeclarationSniffTest.php @@ -71,6 +71,7 @@ public function testNullableReturnTypeHint() $analysers = ['compatibility']; $metrics = self::$api->run($dataSource, $analysers); $versions = $metrics[self::$analyserId]['versions']; + $functions = $metrics[self::$analyserId]['functions']; $this->assertEquals( [ @@ -80,5 +81,15 @@ public function testNullableReturnTypeHint() ], $versions ); + + $this->assertEquals( + '7.1.0', + $functions['testReturn1']['php.min'] + ); + + $this->assertEquals( + '7.1.0', + $functions['testReturn2']['php.min'] + ); } }