From d37f1c4b1493f56db0dc64a799ebfd0fa21601c8 Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Tue, 8 Feb 2022 12:42:43 +0100 Subject: [PATCH] Line coverage stubs: be consistent with actual xDebug/PCOV output --- tests/TestCase.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/TestCase.php b/tests/TestCase.php index 4a75f7cba..aa2b010c5 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -50,30 +50,46 @@ protected function getLineCoverageXdebugDataForBankAccount() RawCodeCoverageData::fromXdebugWithoutPathCoverage([ TEST_FILES_PATH . 'BankAccount.php' => [ 8 => 1, + 9 => -2, 13 => 1, + 14 => -1, + 15 => -1, 16 => 1, + 18 => -1, 29 => 1, + 31 => -1, + 32 => -2, ], ]), RawCodeCoverageData::fromXdebugWithoutPathCoverage([ TEST_FILES_PATH . 'BankAccount.php' => [ 8 => 1, + 9 => -2, 13 => 1, + 14 => -1, + 15 => -1, 16 => 1, + 18 => -1, 22 => 1, + 24 => -1, + 25 => -2, ], ]), RawCodeCoverageData::fromXdebugWithoutPathCoverage([ TEST_FILES_PATH . 'BankAccount.php' => [ 8 => 1, + 9 => -2, 13 => 1, 14 => 1, 15 => 1, + 16 => -1, 18 => 1, 22 => 1, 24 => 1, + 25 => -2, 29 => 1, 31 => 1, + 32 => -2, ], ]), ]; @@ -276,9 +292,15 @@ protected function getPathCoverageXdebugDataForBankAccount() TEST_FILES_PATH . 'BankAccount.php' => [ 'lines' => [ 8 => 1, + 9 => -2, 13 => 1, + 14 => -1, + 15 => -1, 16 => 1, + 18 => -1, 29 => 1, + 31 => -1, + 32 => -2, ], 'functions' => [ 'BankAccount->depositMoney' => [ @@ -457,9 +479,15 @@ protected function getPathCoverageXdebugDataForBankAccount() TEST_FILES_PATH . 'BankAccount.php' => [ 'lines' => [ 8 => 1, + 9 => -2, 13 => 1, + 14 => -1, + 15 => -1, 16 => 1, + 18 => -1, 22 => 1, + 24 => -1, + 25 => -2, ], 'functions' => [ 'BankAccount->depositMoney' => [ @@ -638,14 +666,18 @@ protected function getPathCoverageXdebugDataForBankAccount() TEST_FILES_PATH . 'BankAccount.php' => [ 'lines' => [ 8 => 1, + 9 => -2, 13 => 1, 14 => 1, 15 => 1, + 16 => -1, 18 => 1, 22 => 1, 24 => 1, + 25 => -2, 29 => 1, 31 => 1, + 32 => -2, ], 'functions' => [ 'BankAccount->depositMoney' => [