Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace SebastianBergmann\CodeCoverage; use SebastianBergmann\CodeCoverage\Data\..

Decoded Output download

<?php
  namespace SebastianBergmann\CodeCoverage; use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData; use function array_merge; use function range; use function rmdir; use function unlink; use BankAccountTest; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; use SebastianBergmann\CodeCoverage\Driver\Driver; abstract class TestCase extends \PHPUnit\Framework\TestCase { protected static $TEST_TMP_PATH; public static function setUpBeforeClass() : void { self::$TEST_TMP_PATH = TEST_FILES_PATH . "tmp"; } protected function getLineCoverageXdebugDataForBankAccount() { return array(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "BankAccount.php" => array(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, 33 => -2, 35 => 1))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "BankAccount.php" => array(8 => 1, 9 => -2, 13 => 1, 14 => -1, 15 => -1, 16 => 1, 18 => -1, 29 => 1, 31 => -1, 32 => -2, 33 => -2))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "BankAccount.php" => array(8 => 1, 9 => -2, 13 => 1, 14 => -1, 15 => -1, 16 => 1, 18 => -1, 22 => 1, 24 => -1, 25 => -2))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "BankAccount.php" => array(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, 33 => -2)))); } protected function getPathCoverageXdebugDataForBankAccount() { return array(RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "BankAccount.php" => array("lines" => array(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" => array("BankAccount->depositMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 20, "line_end" => 25, "hit" => 0, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 0))), "BankAccount->getBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 5, "line_start" => 6, "line_end" => 9, "hit" => 1, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 1))), "BankAccount->withdrawMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 27, "line_end" => 32, "hit" => 0, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 0))), "{main}" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 1, "line_start" => 34, "line_end" => 34, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 0))), "BankAccount->setBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 4, "line_start" => 11, "line_end" => 13, "hit" => 0, "out" => array(0 => 5, 1 => 9), "out_hit" => array(0 => 0, 1 => 0)), 5 => array("op_start" => 5, "op_end" => 8, "line_start" => 14, "line_end" => 14, "hit" => 0, "out" => array(0 => 13), "out_hit" => array(0 => 0)), 9 => array("op_start" => 9, "op_end" => 12, "line_start" => 16, "line_end" => 16, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0)), 13 => array("op_start" => 13, "op_end" => 14, "line_start" => 18, "line_end" => 18, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0, 1 => 5, 2 => 13), "hit" => 0), 1 => array("path" => array(0 => 0, 1 => 9), "hit" => 0))))))), RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "BankAccount.php" => array("lines" => array(8 => 1, 9 => -2, 13 => 1, 14 => -1, 15 => -1, 16 => 1, 18 => -1, 29 => 1, 31 => -1, 32 => -2), "functions" => array("BankAccount->depositMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 20, "line_end" => 25, "hit" => 0, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 0))), "BankAccount->getBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 5, "line_start" => 6, "line_end" => 9, "hit" => 1, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 1))), "BankAccount->withdrawMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 27, "line_end" => 32, "hit" => 1, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 1))), "{main}" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 1, "line_start" => 34, "line_end" => 34, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 0))), "BankAccount->setBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 4, "line_start" => 11, "line_end" => 13, "hit" => 1, "out" => array(0 => 5, 1 => 9), "out_hit" => array(0 => 0, 1 => 0)), 5 => array("op_start" => 5, "op_end" => 8, "line_start" => 14, "line_end" => 14, "hit" => 0, "out" => array(0 => 13), "out_hit" => array(0 => 0)), 9 => array("op_start" => 9, "op_end" => 12, "line_start" => 16, "line_end" => 16, "hit" => 1, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0)), 13 => array("op_start" => 13, "op_end" => 14, "line_start" => 18, "line_end" => 18, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0, 1 => 5, 2 => 13), "hit" => 0), 1 => array("path" => array(0 => 0, 1 => 9), "hit" => 1))))))), RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "BankAccount.php" => array("lines" => array(8 => 1, 9 => -2, 13 => 1, 14 => -1, 15 => -1, 16 => 1, 18 => -1, 22 => 1, 24 => -1, 25 => -2), "functions" => array("BankAccount->depositMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 20, "line_end" => 25, "hit" => 1, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 1))), "BankAccount->getBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 5, "line_start" => 6, "line_end" => 9, "hit" => 1, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 1))), "BankAccount->withdrawMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 27, "line_end" => 32, "hit" => 0, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 0))), "{main}" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 1, "line_start" => 34, "line_end" => 34, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 0))), "BankAccount->setBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 4, "line_start" => 11, "line_end" => 13, "hit" => 1, "out" => array(0 => 5, 1 => 9), "out_hit" => array(0 => 0, 1 => 0)), 5 => array("op_start" => 5, "op_end" => 8, "line_start" => 14, "line_end" => 14, "hit" => 0, "out" => array(0 => 13), "out_hit" => array(0 => 0)), 9 => array("op_start" => 9, "op_end" => 12, "line_start" => 16, "line_end" => 16, "hit" => 1, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0)), 13 => array("op_start" => 13, "op_end" => 14, "line_start" => 18, "line_end" => 18, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0, 1 => 5, 2 => 13), "hit" => 0), 1 => array("path" => array(0 => 0, 1 => 9), "hit" => 1))))))), RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "BankAccount.php" => array("lines" => array(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" => array("BankAccount->depositMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 20, "line_end" => 25, "hit" => 1, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 1))), "BankAccount->getBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 5, "line_start" => 6, "line_end" => 9, "hit" => 1, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 1))), "BankAccount->withdrawMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 27, "line_end" => 32, "hit" => 1, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 1))), "{main}" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 1, "line_start" => 34, "line_end" => 34, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 0))), "BankAccount->setBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 4, "line_start" => 11, "line_end" => 13, "hit" => 1, "out" => array(0 => 5, 1 => 9), "out_hit" => array(0 => 0, 1 => 0)), 5 => array("op_start" => 5, "op_end" => 8, "line_start" => 14, "line_end" => 14, "hit" => 1, "out" => array(0 => 13), "out_hit" => array(0 => 0)), 9 => array("op_start" => 9, "op_end" => 12, "line_start" => 16, "line_end" => 16, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0)), 13 => array("op_start" => 13, "op_end" => 14, "line_start" => 18, "line_end" => 18, "hit" => 1, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0, 1 => 5, 2 => 13), "hit" => 1), 1 => array("path" => array(0 => 0, 1 => 9), "hit" => 0)))))))); } protected function getPathCoverageXdebugDataForSourceWithoutNamespace() { return array(RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "source_without_namespace.php" => array("lines" => array(14 => -1, 15 => -1, 16 => -1, 17 => -1, 18 => -1, 19 => 1), "functions" => array("{closure:" . TEST_FILES_PATH . "source_without_namespace.php:14-14}" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 2, "line_start" => 14, "line_end" => 14, "hit" => 0, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 0))), "foo" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 6, "line_start" => 12, "line_end" => 15, "hit" => 0, "out" => array(0 => 7, 1 => 9), "out_hit" => array(0 => 0, 1 => 0)), 7 => array("op_start" => 7, "op_end" => 8, "line_start" => 15, "line_end" => 15, "hit" => 0, "out" => array(0 => 10), "out_hit" => array(0 => 0)), 9 => array("op_start" => 9, "op_end" => 9, "line_start" => 15, "line_end" => 15, "hit" => 0, "out" => array(0 => 10), "out_hit" => array(0 => 0)), 10 => array("op_start" => 10, "op_end" => 18, "line_start" => 15, "line_end" => 18, "hit" => 0, "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0, 1 => 7, 2 => 10), "hit" => 0), 1 => array("path" => array(0 => 0, 1 => 9, 2 => 10), "hit" => 0))), "{main}" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 0, "line_start" => 19, "line_end" => 19, "hit" => 1, "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0), "hit" => 1)))))))); } protected function getLineCoverageForBankAccount() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "BankAccount.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("BankAccountTest::testBalanceIsInitiallyZero", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(6, 9))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(27, 32))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative2"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(20, 25))); $coverage->start("BankAccountTest::testDepositWithdrawMoney"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getPathCoverageForBankAccount() : CodeCoverage { $data = $this->getPathCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("collectsBranchAndPathCoverage")->willReturn(true); $stub->method("stop")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "BankAccount.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("BankAccountTest::testBalanceIsInitiallyZero", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(6, 9))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(27, 32))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative2"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(20, 25))); $coverage->start("BankAccountTest::testDepositWithdrawMoney"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getPathCoverageForSourceWithoutNamespace() : CodeCoverage { $data = $this->getPathCoverageXdebugDataForSourceWithoutNamespace(); $stub = $this->createStub(Driver::class); $stub->method("collectsBranchAndPathCoverage")->willReturn(true); $stub->method("stop")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "source_without_namespace.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("faketest", null, true); $coverage->stop(); return $coverage; } protected function getXdebugDataForNamespacedBankAccount() { return array(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "NamespacedBankAccount.php" => array(13 => 1, 14 => -2, 18 => -1, 19 => -1, 20 => -1, 21 => -1, 23 => -1, 27 => -1, 29 => -1, 30 => -2, 34 => -1, 36 => -1, 37 => -2))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "NamespacedBankAccount.php" => array(13 => 1, 18 => 1, 21 => 1, 34 => 1))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "NamespacedBankAccount.php" => array(13 => 1, 18 => 1, 21 => 1, 27 => 1))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "NamespacedBankAccount.php" => array(13 => 1, 18 => 1, 19 => 1, 20 => 1, 23 => 1, 27 => 1, 29 => 1, 34 => 1, 36 => 1)))); } protected function getLineCoverageForNamespacedBankAccount() : CodeCoverage { $data = $this->getXdebugDataForNamespacedBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "NamespacedBankAccount.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("BankAccountTest::testBalanceIsInitiallyZero", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "NamespacedBankAccount.php" => range(11, 14))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative"); $coverage->stop(true, null, array(TEST_FILES_PATH . "NamespacedBankAccount.php" => range(32, 37))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative2"); $coverage->stop(true, null, array(TEST_FILES_PATH . "NamespacedBankAccount.php" => range(25, 30))); $coverage->start("BankAccountTest::testDepositWithdrawMoney"); $coverage->stop(true, null, array(TEST_FILES_PATH . "NamespacedBankAccount.php" => array_merge(range(11, 14), range(25, 30), range(32, 37)))); return $coverage; } protected function getLineCoverageForBankAccountForFirstTwoTests() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "BankAccount.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("BankAccountTest::testBalanceIsInitiallyZero", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(6, 9))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(27, 32))); return $coverage; } protected function getLineCoverageForBankAccountForLastTwoTests() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn($data[2], $data[3]); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "BankAccount.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative2"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(20, 25))); $coverage->start("BankAccountTest::testDepositWithdrawMoney"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getExpectedLineCoverageDataArrayForBankAccount() : array { return array(TEST_FILES_PATH . "BankAccount.php" => array(8 => array(0 => "BankAccountTest::testBalanceIsInitiallyZero", 1 => "BankAccountTest::testDepositWithdrawMoney"), 13 => array(), 14 => array(), 16 => array(), 22 => array(0 => "BankAccountTest::testBalanceCannotBecomeNegative2", 1 => "BankAccountTest::testDepositWithdrawMoney"), 24 => array(0 => "BankAccountTest::testDepositWithdrawMoney"), 29 => array(0 => "BankAccountTest::testBalanceCannotBecomeNegative", 1 => "BankAccountTest::testDepositWithdrawMoney"), 31 => array(0 => "BankAccountTest::testDepositWithdrawMoney"), 32 => null)); } protected function getExpectedLineCoverageDataArrayForBankAccountInReverseOrder() : array { return array(TEST_FILES_PATH . "BankAccount.php" => array(8 => array(0 => "BankAccountTest::testDepositWithdrawMoney", 1 => "BankAccountTest::testBalanceIsInitiallyZero"), 13 => array(), 14 => array(), 16 => array(), 22 => array(0 => "BankAccountTest::testBalanceCannotBecomeNegative2", 1 => "BankAccountTest::testDepositWithdrawMoney"), 24 => array(0 => "BankAccountTest::testDepositWithdrawMoney"), 29 => array(0 => "BankAccountTest::testDepositWithdrawMoney", 1 => "BankAccountTest::testBalanceCannotBecomeNegative"), 31 => array(0 => "BankAccountTest::testDepositWithdrawMoney"), 32 => null)); } protected function getPathCoverageForBankAccountForFirstTwoTests() : CodeCoverage { $data = $this->getPathCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "BankAccount.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("BankAccountTest::testBalanceIsInitiallyZero", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(6, 9))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(27, 32))); return $coverage; } protected function getPathCoverageForBankAccountForLastTwoTests() : CodeCoverage { $data = $this->getPathCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn($data[2], $data[3]); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "BankAccount.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative2"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(20, 25))); $coverage->start("BankAccountTest::testDepositWithdrawMoney"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getExpectedPathCoverageDataArrayForBankAccount() : array { return array(TEST_FILES_PATH . "BankAccount.php" => array("BankAccount->depositMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 20, "line_end" => 25, "hit" => array(0 => "BankAccountTest::testBalanceCannotBecomeNegative2", 1 => "BankAccountTest::testDepositWithdrawMoney"), "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => array(0 => "BankAccountTest::testBalanceCannotBecomeNegative2", 1 => "BankAccountTest::testDepositWithdrawMoney")))), "BankAccount->getBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 5, "line_start" => 6, "line_end" => 9, "hit" => array(0 => "BankAccountTest::testBalanceIsInitiallyZero", 1 => "BankAccountTest::testDepositWithdrawMoney"), "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => array(0 => "BankAccountTest::testBalanceIsInitiallyZero", 1 => "BankAccountTest::testDepositWithdrawMoney")))), "BankAccount->withdrawMoney" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 14, "line_start" => 27, "line_end" => 32, "hit" => array(0 => "BankAccountTest::testBalanceCannotBecomeNegative", 1 => "BankAccountTest::testDepositWithdrawMoney"), "out" => array(), "out_hit" => array())), "paths" => array(0 => array("path" => array(0 => 0), "hit" => array(0 => "BankAccountTest::testBalanceCannotBecomeNegative", 1 => "BankAccountTest::testDepositWithdrawMoney")))), "{main}" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 1, "line_start" => 34, "line_end" => 34, "hit" => array(), "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0), "hit" => array()))), "BankAccount->setBalance" => array("branches" => array(0 => array("op_start" => 0, "op_end" => 4, "line_start" => 11, "line_end" => 13, "hit" => array(), "out" => array(0 => 5, 1 => 9), "out_hit" => array(0 => 0, 1 => 0)), 5 => array("op_start" => 5, "op_end" => 8, "line_start" => 14, "line_end" => 14, "hit" => array(), "out" => array(0 => 13), "out_hit" => array(0 => 0)), 9 => array("op_start" => 9, "op_end" => 12, "line_start" => 16, "line_end" => 16, "hit" => array(), "out" => array(0 => 2147483645), "out_hit" => array(0 => 0)), 13 => array("op_start" => 13, "op_end" => 14, "line_start" => 18, "line_end" => 18, "hit" => array(), "out" => array(0 => 2147483645), "out_hit" => array(0 => 0))), "paths" => array(0 => array("path" => array(0 => 0, 1 => 5, 2 => 13), "hit" => array()), 1 => array("path" => array(0 => 0, 1 => 9), "hit" => array()))))); } protected function getCoverageForFileWithIgnoredLines() : CodeCoverage { $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "source_with_ignore.php"); $coverage = new CodeCoverage($this->setUpXdebugStubForFileWithIgnoredLines(), $filter); $coverage->start("FileWithIgnoredLines", null, true); $coverage->stop(); return $coverage; } protected function setUpXdebugStubForFileWithIgnoredLines() : Driver { $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "source_with_ignore.php" => array(2 => 1, 4 => -1, 6 => -1)))); return $stub; } protected function getLineCoverageForFileWithEval() : CodeCoverage { $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "source_with_eval.php"); $coverage = new CodeCoverage($this->setUpXdebugStubForFileWithEval(), $filter); $coverage->start("FileWithEval", null, true); $coverage->stop(); return $coverage; } protected function setUpXdebugStubForFileWithEval() : Driver { $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "source_with_eval.php" => array(3 => 1, 5 => 1), TEST_FILES_PATH . "source_with_eval.php(5) : eval()'d code" => array(1 => 1)))); return $stub; } protected function getCoverageForClassWithAnonymousFunction() : CodeCoverage { $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "source_with_class_and_anonymous_function.php"); $coverage = new CodeCoverage($this->setUpXdebugStubForClassWithAnonymousFunction(), $filter); $coverage->start("ClassWithAnonymousFunction", null, true); $coverage->stop(); return $coverage; } protected function setUpXdebugStubForClassWithAnonymousFunction() : Driver { $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "source_with_class_and_anonymous_function.php" => array(7 => 1, 9 => 1, 10 => -1, 11 => 1, 12 => 1, 13 => 1, 14 => 1, 17 => 1, 18 => 1)))); return $stub; } protected function getCoverageForClassWithOutsideFunction() : CodeCoverage { $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "source_with_class_and_outside_function.php"); $coverage = new CodeCoverage($this->setUpXdebugStubForClassWithOutsideFunction(), $filter); $coverage->start("ClassWithOutsideFunction", null, true); $coverage->stop(); return $coverage; } protected function setUpXdebugStubForClassWithOutsideFunction() : Driver { $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "source_with_class_and_outside_function.php" => array(6 => 1, 12 => 1, 13 => 1, 16 => -1)))); return $stub; } protected function removeTemporaryFiles() : void { $tmpFilesIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(self::$TEST_TMP_PATH, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST); foreach ($tmpFilesIterator as $path => $fileInfo) { $pathname = $fileInfo->getPathname(); $fileInfo->isDir() ? rmdir($pathname) : unlink($pathname); } } protected function getCoverageForFilesWithUncoveredIncluded() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "BankAccount.php"); $filter->includeFile(TEST_FILES_PATH . "NamespacedBankAccount.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->includeUncoveredFiles(); $coverage->start("BankAccountTest::testBalanceIsInitiallyZero", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(6, 9))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(27, 32))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative2"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(20, 25))); $coverage->start("BankAccountTest::testDepositWithdrawMoney"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getCoverageForFilesWithUncoveredExcluded() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("stop")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "BankAccount.php"); $filter->includeFile(TEST_FILES_PATH . "NamespacedBankAccount.php"); $coverage = new CodeCoverage($stub, $filter); $coverage->excludeUncoveredFiles(); $coverage->start("BankAccountTest::testBalanceIsInitiallyZero", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(6, 9))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(27, 32))); $coverage->start("BankAccountTest::testBalanceCannotBecomeNegative2"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => range(20, 25))); $coverage->start("BankAccountTest::testDepositWithdrawMoney"); $coverage->stop(true, null, array(TEST_FILES_PATH . "BankAccount.php" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } } ?>

Did this file decode correctly?

Original Code

<?php
  namespace SebastianBergmann\CodeCoverage; use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData; use function array_merge; use function range; use function rmdir; use function unlink; use BankAccountTest; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; use SebastianBergmann\CodeCoverage\Driver\Driver; abstract class TestCase extends \PHPUnit\Framework\TestCase { protected static $TEST_TMP_PATH; public static function setUpBeforeClass() : void { self::$TEST_TMP_PATH = TEST_FILES_PATH . "\164\x6d\x70"; } protected function getLineCoverageXdebugDataForBankAccount() { return array(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\102\x61\x6e\x6b\x41\143\143\x6f\165\156\164\x2e\160\150\160" => array(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, 33 => -2, 35 => 1))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\x42\141\156\x6b\x41\143\x63\157\165\156\x74\56\160\150\x70" => array(8 => 1, 9 => -2, 13 => 1, 14 => -1, 15 => -1, 16 => 1, 18 => -1, 29 => 1, 31 => -1, 32 => -2, 33 => -2))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\102\141\x6e\x6b\x41\143\x63\157\x75\156\164\56\160\x68\160" => array(8 => 1, 9 => -2, 13 => 1, 14 => -1, 15 => -1, 16 => 1, 18 => -1, 22 => 1, 24 => -1, 25 => -2))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\102\141\x6e\153\101\143\143\157\165\156\x74\x2e\160\x68\x70" => array(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, 33 => -2)))); } protected function getPathCoverageXdebugDataForBankAccount() { return array(RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "\x42\x61\x6e\x6b\x41\143\x63\157\x75\x6e\164\x2e\x70\x68\160" => array("\x6c\x69\x6e\x65\163" => array(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), "\146\165\156\x63\164\151\157\156\163" => array("\x42\141\x6e\153\x41\143\x63\157\165\x6e\164\55\x3e\x64\x65\x70\157\x73\151\x74\x4d\157\x6e\145\171" => array("\142\162\141\156\x63\x68\x65\x73" => array(0 => array("\x6f\x70\137\x73\164\x61\162\164" => 0, "\x6f\x70\x5f\145\156\144" => 14, "\x6c\151\156\x65\137\x73\164\x61\162\164" => 20, "\x6c\x69\156\145\x5f\145\156\x64" => 25, "\150\151\164" => 0, "\x6f\165\164" => array(), "\157\x75\x74\137\150\151\164" => array())), "\160\141\x74\x68\x73" => array(0 => array("\160\141\x74\x68" => array(0 => 0), "\x68\x69\164" => 0))), "\102\141\156\153\101\143\143\157\165\156\164\x2d\76\147\145\x74\102\141\x6c\x61\x6e\143\x65" => array("\142\162\141\156\x63\x68\145\163" => array(0 => array("\157\x70\137\x73\x74\x61\162\164" => 0, "\157\x70\x5f\x65\x6e\144" => 5, "\154\151\x6e\x65\137\x73\x74\141\x72\x74" => 6, "\154\x69\156\145\137\145\156\144" => 9, "\150\x69\164" => 1, "\157\x75\x74" => array(), "\157\165\164\x5f\150\x69\164" => array())), "\160\x61\x74\150\x73" => array(0 => array("\160\x61\164\150" => array(0 => 0), "\150\151\x74" => 1))), "\x42\x61\156\x6b\x41\x63\x63\157\x75\x6e\164\x2d\x3e\167\x69\x74\150\144\x72\141\167\115\157\x6e\145\x79" => array("\x62\162\x61\x6e\143\150\x65\x73" => array(0 => array("\157\x70\x5f\x73\164\x61\x72\x74" => 0, "\x6f\160\137\145\x6e\x64" => 14, "\154\x69\156\x65\x5f\163\x74\x61\x72\x74" => 27, "\154\x69\156\x65\x5f\x65\x6e\144" => 32, "\x68\x69\x74" => 0, "\x6f\x75\x74" => array(), "\157\165\164\x5f\x68\151\164" => array())), "\160\141\164\x68\x73" => array(0 => array("\x70\x61\164\x68" => array(0 => 0), "\150\151\x74" => 0))), "\x7b\x6d\x61\151\156\x7d" => array("\x62\162\141\x6e\143\x68\x65\163" => array(0 => array("\157\x70\x5f\x73\x74\x61\x72\x74" => 0, "\x6f\160\137\x65\156\x64" => 1, "\154\151\156\x65\137\x73\x74\141\162\x74" => 34, "\154\x69\156\145\137\x65\156\144" => 34, "\150\x69\164" => 0, "\x6f\165\164" => array(0 => 2147483645), "\x6f\x75\164\137\x68\151\164" => array(0 => 0))), "\x70\141\x74\x68\163" => array(0 => array("\160\141\x74\x68" => array(0 => 0), "\x68\x69\164" => 0))), "\102\x61\156\x6b\x41\x63\x63\x6f\165\156\x74\55\x3e\x73\x65\164\x42\141\154\141\156\143\x65" => array("\142\162\141\x6e\143\150\145\163" => array(0 => array("\157\160\137\163\164\x61\x72\164" => 0, "\157\160\x5f\x65\x6e\x64" => 4, "\x6c\x69\156\x65\137\x73\x74\141\x72\x74" => 11, "\154\151\156\x65\x5f\145\x6e\x64" => 13, "\150\x69\164" => 0, "\157\165\x74" => array(0 => 5, 1 => 9), "\157\x75\164\137\150\151\164" => array(0 => 0, 1 => 0)), 5 => array("\x6f\x70\137\x73\164\141\x72\164" => 5, "\x6f\160\x5f\145\x6e\144" => 8, "\x6c\x69\156\145\137\163\x74\x61\x72\x74" => 14, "\154\151\156\x65\x5f\145\156\144" => 14, "\x68\x69\x74" => 0, "\157\x75\164" => array(0 => 13), "\157\165\164\137\150\151\164" => array(0 => 0)), 9 => array("\157\x70\x5f\x73\164\x61\x72\164" => 9, "\157\160\137\145\x6e\x64" => 12, "\x6c\151\156\145\x5f\x73\164\141\162\164" => 16, "\154\151\156\145\x5f\x65\156\144" => 16, "\x68\x69\x74" => 0, "\157\x75\x74" => array(0 => 2147483645), "\x6f\165\164\137\150\x69\x74" => array(0 => 0)), 13 => array("\x6f\160\137\163\x74\141\162\x74" => 13, "\157\160\137\x65\x6e\144" => 14, "\x6c\151\x6e\x65\137\163\x74\141\x72\x74" => 18, "\154\x69\156\145\x5f\145\156\144" => 18, "\150\151\164" => 0, "\x6f\x75\x74" => array(0 => 2147483645), "\x6f\x75\164\137\x68\x69\164" => array(0 => 0))), "\160\x61\164\150\x73" => array(0 => array("\160\141\164\x68" => array(0 => 0, 1 => 5, 2 => 13), "\150\x69\x74" => 0), 1 => array("\160\141\x74\x68" => array(0 => 0, 1 => 9), "\x68\151\x74" => 0))))))), RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "\102\141\x6e\x6b\101\143\x63\x6f\x75\156\164\56\160\150\160" => array("\x6c\x69\156\145\x73" => array(8 => 1, 9 => -2, 13 => 1, 14 => -1, 15 => -1, 16 => 1, 18 => -1, 29 => 1, 31 => -1, 32 => -2), "\146\165\156\143\x74\151\157\x6e\163" => array("\102\x61\x6e\x6b\101\x63\x63\x6f\x75\156\164\x2d\x3e\x64\145\x70\x6f\163\x69\x74\x4d\x6f\156\145\171" => array("\142\162\x61\156\x63\150\x65\163" => array(0 => array("\157\x70\137\x73\x74\x61\162\164" => 0, "\x6f\160\137\145\x6e\x64" => 14, "\x6c\151\x6e\145\x5f\x73\164\141\162\164" => 20, "\x6c\151\x6e\145\x5f\145\x6e\x64" => 25, "\150\151\164" => 0, "\x6f\x75\164" => array(), "\x6f\165\164\137\150\x69\164" => array())), "\160\141\x74\x68\x73" => array(0 => array("\x70\x61\164\150" => array(0 => 0), "\150\151\x74" => 0))), "\x42\141\x6e\x6b\101\x63\143\157\x75\156\x74\x2d\x3e\147\x65\164\x42\141\x6c\x61\x6e\x63\145" => array("\142\162\141\156\143\x68\145\163" => array(0 => array("\157\160\137\163\164\x61\162\164" => 0, "\157\x70\137\x65\156\144" => 5, "\x6c\x69\x6e\145\137\x73\x74\141\x72\164" => 6, "\x6c\151\156\x65\x5f\x65\x6e\144" => 9, "\x68\x69\164" => 1, "\157\x75\x74" => array(), "\157\x75\x74\137\x68\151\x74" => array())), "\160\141\164\150\163" => array(0 => array("\160\x61\x74\x68" => array(0 => 0), "\x68\x69\x74" => 1))), "\102\141\156\153\x41\x63\x63\x6f\165\x6e\164\x2d\x3e\x77\x69\164\x68\144\x72\x61\167\115\x6f\156\145\171" => array("\142\162\x61\156\x63\x68\145\163" => array(0 => array("\x6f\x70\137\x73\164\141\162\164" => 0, "\x6f\160\137\145\x6e\x64" => 14, "\154\x69\156\x65\x5f\x73\x74\141\162\164" => 27, "\154\x69\156\x65\137\x65\x6e\x64" => 32, "\150\151\x74" => 1, "\x6f\165\x74" => array(), "\157\x75\164\x5f\x68\x69\x74" => array())), "\x70\141\x74\x68\163" => array(0 => array("\160\x61\x74\x68" => array(0 => 0), "\x68\151\164" => 1))), "\173\x6d\x61\151\x6e\175" => array("\142\x72\141\x6e\x63\150\x65\163" => array(0 => array("\157\160\137\163\164\x61\162\164" => 0, "\157\x70\137\x65\x6e\x64" => 1, "\x6c\151\156\145\137\x73\164\141\162\x74" => 34, "\154\x69\156\x65\x5f\x65\x6e\x64" => 34, "\150\x69\164" => 0, "\x6f\x75\164" => array(0 => 2147483645), "\x6f\165\164\137\150\x69\164" => array(0 => 0))), "\160\141\x74\150\163" => array(0 => array("\160\x61\164\x68" => array(0 => 0), "\x68\151\164" => 0))), "\x42\x61\x6e\x6b\101\143\143\157\x75\156\x74\x2d\x3e\163\x65\164\102\141\154\141\x6e\143\x65" => array("\x62\162\141\156\x63\x68\x65\x73" => array(0 => array("\x6f\x70\137\163\x74\x61\x72\x74" => 0, "\x6f\160\137\145\x6e\x64" => 4, "\x6c\151\156\x65\x5f\163\x74\141\162\x74" => 11, "\x6c\151\x6e\145\137\145\156\144" => 13, "\150\151\164" => 1, "\157\165\x74" => array(0 => 5, 1 => 9), "\x6f\165\164\x5f\150\x69\x74" => array(0 => 0, 1 => 0)), 5 => array("\x6f\x70\x5f\x73\x74\x61\x72\164" => 5, "\157\x70\137\x65\156\144" => 8, "\154\x69\x6e\x65\137\x73\164\141\x72\x74" => 14, "\154\x69\x6e\x65\137\x65\156\144" => 14, "\150\x69\164" => 0, "\157\165\x74" => array(0 => 13), "\157\165\164\x5f\150\x69\164" => array(0 => 0)), 9 => array("\x6f\x70\137\x73\x74\141\162\x74" => 9, "\x6f\x70\137\x65\x6e\x64" => 12, "\154\x69\x6e\x65\137\x73\164\x61\x72\164" => 16, "\x6c\151\x6e\145\137\145\156\144" => 16, "\150\151\x74" => 1, "\x6f\165\164" => array(0 => 2147483645), "\157\x75\164\137\150\x69\164" => array(0 => 0)), 13 => array("\x6f\160\x5f\x73\164\141\x72\x74" => 13, "\x6f\160\x5f\x65\156\144" => 14, "\x6c\151\x6e\x65\x5f\163\x74\x61\162\164" => 18, "\x6c\151\156\145\x5f\x65\156\144" => 18, "\x68\x69\x74" => 0, "\157\x75\164" => array(0 => 2147483645), "\157\x75\164\137\150\151\x74" => array(0 => 0))), "\x70\x61\164\150\x73" => array(0 => array("\x70\141\x74\150" => array(0 => 0, 1 => 5, 2 => 13), "\150\151\x74" => 0), 1 => array("\x70\141\164\x68" => array(0 => 0, 1 => 9), "\150\x69\x74" => 1))))))), RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "\102\141\x6e\153\x41\x63\x63\157\x75\x6e\164\56\x70\150\160" => array("\x6c\x69\x6e\x65\x73" => array(8 => 1, 9 => -2, 13 => 1, 14 => -1, 15 => -1, 16 => 1, 18 => -1, 22 => 1, 24 => -1, 25 => -2), "\x66\x75\x6e\x63\164\151\157\156\x73" => array("\x42\141\x6e\x6b\101\143\143\x6f\165\156\164\55\x3e\x64\x65\x70\157\x73\151\164\115\157\156\145\x79" => array("\x62\x72\141\x6e\143\150\145\163" => array(0 => array("\x6f\160\137\163\x74\x61\x72\x74" => 0, "\x6f\x70\x5f\145\156\144" => 14, "\x6c\151\x6e\145\137\163\x74\x61\162\x74" => 20, "\x6c\151\x6e\x65\137\145\156\144" => 25, "\x68\x69\164" => 1, "\157\x75\164" => array(), "\157\x75\x74\x5f\x68\151\x74" => array())), "\x70\x61\164\x68\163" => array(0 => array("\x70\x61\x74\x68" => array(0 => 0), "\150\x69\164" => 1))), "\x42\x61\x6e\x6b\101\x63\143\157\x75\x6e\164\55\x3e\x67\x65\x74\x42\x61\154\x61\x6e\143\x65" => array("\142\162\141\x6e\x63\x68\145\163" => array(0 => array("\157\160\137\x73\x74\x61\x72\164" => 0, "\x6f\x70\x5f\x65\x6e\144" => 5, "\154\x69\156\x65\137\163\164\141\x72\164" => 6, "\x6c\151\x6e\145\137\145\x6e\144" => 9, "\150\x69\164" => 1, "\x6f\165\x74" => array(), "\157\x75\x74\137\x68\x69\x74" => array())), "\160\141\x74\150\x73" => array(0 => array("\160\x61\164\150" => array(0 => 0), "\x68\151\x74" => 1))), "\102\x61\156\x6b\101\x63\143\x6f\x75\156\164\x2d\x3e\x77\x69\164\x68\144\162\141\167\115\157\156\x65\x79" => array("\x62\x72\x61\156\x63\x68\145\163" => array(0 => array("\x6f\160\137\x73\164\x61\x72\164" => 0, "\157\160\x5f\x65\156\x64" => 14, "\154\x69\x6e\145\x5f\163\164\141\x72\x74" => 27, "\x6c\151\156\145\x5f\145\x6e\144" => 32, "\150\151\x74" => 0, "\157\x75\164" => array(), "\157\165\x74\137\x68\x69\x74" => array())), "\160\x61\x74\150\163" => array(0 => array("\160\141\164\x68" => array(0 => 0), "\x68\151\x74" => 0))), "\x7b\155\x61\x69\x6e\175" => array("\x62\162\141\156\x63\150\145\163" => array(0 => array("\157\x70\137\x73\164\141\162\164" => 0, "\x6f\x70\137\x65\x6e\x64" => 1, "\x6c\x69\x6e\x65\x5f\x73\164\x61\x72\x74" => 34, "\x6c\151\x6e\145\137\x65\156\144" => 34, "\150\x69\x74" => 0, "\x6f\165\164" => array(0 => 2147483645), "\157\x75\x74\137\150\151\164" => array(0 => 0))), "\160\x61\164\150\163" => array(0 => array("\160\141\164\150" => array(0 => 0), "\x68\151\164" => 0))), "\x42\x61\x6e\153\x41\143\143\x6f\165\x6e\x74\x2d\76\163\x65\164\x42\x61\x6c\x61\x6e\x63\145" => array("\142\162\141\156\x63\150\145\163" => array(0 => array("\157\x70\137\x73\164\141\162\164" => 0, "\x6f\x70\137\145\156\144" => 4, "\x6c\x69\x6e\x65\137\163\164\x61\x72\164" => 11, "\154\151\x6e\145\x5f\x65\x6e\144" => 13, "\150\x69\164" => 1, "\x6f\x75\164" => array(0 => 5, 1 => 9), "\157\165\x74\137\x68\x69\x74" => array(0 => 0, 1 => 0)), 5 => array("\x6f\160\x5f\x73\x74\141\162\164" => 5, "\x6f\160\137\x65\x6e\x64" => 8, "\x6c\151\156\x65\137\x73\x74\141\162\164" => 14, "\154\x69\156\145\137\145\x6e\144" => 14, "\x68\x69\164" => 0, "\x6f\x75\x74" => array(0 => 13), "\x6f\165\x74\x5f\x68\151\x74" => array(0 => 0)), 9 => array("\157\x70\137\163\x74\141\x72\x74" => 9, "\157\160\137\x65\x6e\144" => 12, "\x6c\151\156\x65\137\163\x74\x61\x72\164" => 16, "\154\x69\x6e\x65\x5f\145\x6e\144" => 16, "\150\x69\x74" => 1, "\x6f\165\x74" => array(0 => 2147483645), "\157\165\x74\x5f\x68\151\x74" => array(0 => 0)), 13 => array("\x6f\160\137\163\x74\x61\162\164" => 13, "\157\x70\x5f\145\156\144" => 14, "\x6c\151\156\x65\x5f\163\x74\x61\162\x74" => 18, "\x6c\151\x6e\145\x5f\x65\156\x64" => 18, "\150\x69\x74" => 0, "\x6f\165\164" => array(0 => 2147483645), "\157\165\164\137\x68\x69\x74" => array(0 => 0))), "\160\141\164\x68\x73" => array(0 => array("\x70\x61\x74\150" => array(0 => 0, 1 => 5, 2 => 13), "\150\151\x74" => 0), 1 => array("\x70\x61\164\150" => array(0 => 0, 1 => 9), "\x68\151\164" => 1))))))), RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "\x42\141\156\153\101\x63\143\157\165\x6e\x74\x2e\160\150\160" => array("\154\x69\x6e\145\163" => array(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), "\146\165\x6e\143\x74\151\157\x6e\163" => array("\102\141\x6e\153\x41\x63\143\157\x75\156\164\x2d\76\x64\145\x70\157\163\x69\x74\x4d\157\x6e\x65\171" => array("\x62\162\x61\x6e\x63\x68\x65\163" => array(0 => array("\x6f\160\137\163\x74\141\162\x74" => 0, "\x6f\x70\137\x65\x6e\144" => 14, "\x6c\x69\x6e\x65\137\x73\164\141\x72\x74" => 20, "\154\151\x6e\145\137\145\156\144" => 25, "\150\x69\164" => 1, "\157\165\164" => array(), "\157\x75\164\137\150\x69\164" => array())), "\160\x61\164\150\163" => array(0 => array("\x70\141\x74\x68" => array(0 => 0), "\x68\151\x74" => 1))), "\x42\x61\x6e\153\101\x63\x63\x6f\x75\156\164\x2d\x3e\x67\145\164\x42\x61\154\141\x6e\x63\x65" => array("\142\162\141\x6e\x63\x68\145\163" => array(0 => array("\x6f\x70\x5f\x73\164\x61\162\x74" => 0, "\157\160\137\145\x6e\144" => 5, "\154\151\156\x65\137\x73\164\141\162\164" => 6, "\x6c\151\156\x65\x5f\145\x6e\144" => 9, "\150\x69\164" => 1, "\x6f\165\x74" => array(), "\157\x75\164\137\150\151\x74" => array())), "\160\141\164\x68\x73" => array(0 => array("\160\141\164\x68" => array(0 => 0), "\x68\151\x74" => 1))), "\102\x61\x6e\x6b\101\143\x63\157\x75\156\x74\x2d\x3e\167\x69\x74\150\x64\x72\141\167\115\x6f\x6e\145\171" => array("\142\x72\141\156\143\150\145\x73" => array(0 => array("\x6f\x70\x5f\163\x74\x61\162\x74" => 0, "\157\160\x5f\145\x6e\x64" => 14, "\x6c\x69\x6e\x65\x5f\x73\164\x61\x72\x74" => 27, "\x6c\x69\156\x65\x5f\145\x6e\144" => 32, "\x68\x69\164" => 1, "\x6f\x75\164" => array(), "\x6f\165\164\x5f\x68\x69\164" => array())), "\x70\141\164\150\163" => array(0 => array("\x70\141\x74\150" => array(0 => 0), "\150\151\x74" => 1))), "\x7b\155\x61\x69\x6e\175" => array("\x62\x72\x61\x6e\x63\x68\145\163" => array(0 => array("\157\160\137\163\164\141\162\164" => 0, "\x6f\160\x5f\145\x6e\x64" => 1, "\x6c\151\156\x65\137\x73\x74\141\162\x74" => 34, "\154\151\x6e\x65\137\x65\156\x64" => 34, "\x68\x69\164" => 0, "\157\165\164" => array(0 => 2147483645), "\157\x75\164\x5f\150\x69\x74" => array(0 => 0))), "\x70\x61\x74\150\163" => array(0 => array("\x70\x61\164\150" => array(0 => 0), "\x68\x69\164" => 0))), "\102\x61\x6e\x6b\x41\x63\143\x6f\165\x6e\164\55\76\x73\x65\164\x42\141\x6c\141\x6e\143\145" => array("\x62\x72\141\x6e\143\150\x65\x73" => array(0 => array("\x6f\160\137\x73\x74\x61\162\x74" => 0, "\x6f\x70\137\x65\x6e\x64" => 4, "\x6c\151\x6e\x65\x5f\x73\x74\x61\162\x74" => 11, "\x6c\151\x6e\x65\137\145\x6e\x64" => 13, "\x68\x69\164" => 1, "\x6f\165\164" => array(0 => 5, 1 => 9), "\x6f\165\164\x5f\150\151\164" => array(0 => 0, 1 => 0)), 5 => array("\x6f\160\x5f\163\164\141\162\x74" => 5, "\x6f\160\137\145\156\x64" => 8, "\x6c\x69\x6e\x65\137\163\x74\x61\162\164" => 14, "\x6c\x69\x6e\145\137\145\x6e\x64" => 14, "\150\x69\x74" => 1, "\157\165\164" => array(0 => 13), "\x6f\x75\x74\137\150\151\x74" => array(0 => 0)), 9 => array("\157\x70\137\163\164\x61\162\164" => 9, "\157\x70\x5f\x65\x6e\x64" => 12, "\154\151\156\x65\x5f\x73\164\x61\x72\164" => 16, "\x6c\151\156\145\137\x65\156\x64" => 16, "\x68\151\164" => 0, "\x6f\165\x74" => array(0 => 2147483645), "\157\165\x74\137\x68\x69\x74" => array(0 => 0)), 13 => array("\x6f\160\x5f\x73\164\x61\162\x74" => 13, "\157\x70\x5f\x65\x6e\144" => 14, "\x6c\x69\156\x65\x5f\x73\x74\x61\x72\x74" => 18, "\x6c\x69\156\145\137\145\x6e\144" => 18, "\150\x69\x74" => 1, "\157\165\164" => array(0 => 2147483645), "\157\x75\164\x5f\x68\x69\164" => array(0 => 0))), "\160\141\x74\x68\x73" => array(0 => array("\x70\141\164\150" => array(0 => 0, 1 => 5, 2 => 13), "\150\151\164" => 1), 1 => array("\x70\x61\164\x68" => array(0 => 0, 1 => 9), "\150\x69\x74" => 0)))))))); } protected function getPathCoverageXdebugDataForSourceWithoutNamespace() { return array(RawCodeCoverageData::fromXdebugWithPathCoverage(array(TEST_FILES_PATH . "\163\157\x75\162\143\x65\137\167\151\x74\150\x6f\x75\164\137\156\141\x6d\x65\x73\160\x61\x63\145\56\x70\150\x70" => array("\154\x69\x6e\x65\163" => array(14 => -1, 15 => -1, 16 => -1, 17 => -1, 18 => -1, 19 => 1), "\x66\x75\x6e\143\164\151\x6f\x6e\163" => array("\x7b\x63\x6c\x6f\x73\165\x72\x65\72" . TEST_FILES_PATH . "\x73\x6f\x75\x72\x63\x65\137\167\151\164\150\157\x75\x74\x5f\x6e\141\155\x65\163\160\141\x63\145\x2e\x70\x68\160\x3a\x31\64\55\61\x34\175" => array("\x62\162\141\156\143\150\x65\163" => array(0 => array("\157\160\x5f\163\x74\x61\162\164" => 0, "\x6f\160\137\145\x6e\x64" => 2, "\154\x69\156\145\x5f\x73\164\x61\x72\x74" => 14, "\154\151\x6e\x65\x5f\145\156\x64" => 14, "\x68\x69\x74" => 0, "\x6f\165\164" => array(0 => 2147483645), "\x6f\x75\x74\x5f\150\x69\164" => array(0 => 0))), "\160\x61\x74\x68\x73" => array(0 => array("\x70\141\164\150" => array(0 => 0), "\150\151\x74" => 0))), "\x66\x6f\x6f" => array("\142\162\141\x6e\143\150\x65\x73" => array(0 => array("\x6f\x70\x5f\x73\164\x61\162\164" => 0, "\x6f\160\137\145\156\144" => 6, "\x6c\151\x6e\145\x5f\x73\164\141\162\x74" => 12, "\154\x69\x6e\x65\x5f\x65\156\x64" => 15, "\150\151\x74" => 0, "\x6f\x75\x74" => array(0 => 7, 1 => 9), "\157\x75\164\x5f\x68\151\164" => array(0 => 0, 1 => 0)), 7 => array("\x6f\160\137\163\x74\141\x72\164" => 7, "\x6f\160\x5f\x65\x6e\144" => 8, "\154\x69\x6e\145\x5f\163\164\x61\x72\x74" => 15, "\x6c\151\156\145\x5f\x65\x6e\x64" => 15, "\x68\x69\164" => 0, "\157\x75\x74" => array(0 => 10), "\x6f\x75\164\x5f\150\151\164" => array(0 => 0)), 9 => array("\x6f\x70\137\x73\164\x61\x72\x74" => 9, "\x6f\x70\137\x65\156\x64" => 9, "\x6c\x69\156\x65\x5f\x73\164\x61\x72\x74" => 15, "\x6c\151\156\x65\137\x65\156\x64" => 15, "\x68\x69\x74" => 0, "\157\x75\x74" => array(0 => 10), "\x6f\165\164\137\150\151\x74" => array(0 => 0)), 10 => array("\x6f\x70\x5f\x73\164\x61\162\164" => 10, "\x6f\160\x5f\x65\156\x64" => 18, "\x6c\151\156\145\x5f\163\164\x61\x72\164" => 15, "\154\151\x6e\x65\x5f\x65\156\144" => 18, "\x68\151\164" => 0, "\157\165\164" => array(), "\157\165\x74\x5f\x68\151\164" => array())), "\160\x61\164\150\x73" => array(0 => array("\160\x61\x74\150" => array(0 => 0, 1 => 7, 2 => 10), "\x68\x69\164" => 0), 1 => array("\160\x61\x74\x68" => array(0 => 0, 1 => 9, 2 => 10), "\150\x69\164" => 0))), "\x7b\155\x61\x69\x6e\175" => array("\142\162\141\x6e\143\x68\145\163" => array(0 => array("\x6f\160\x5f\163\x74\x61\x72\164" => 0, "\x6f\160\x5f\x65\156\144" => 0, "\x6c\x69\156\x65\137\x73\x74\141\x72\x74" => 19, "\x6c\x69\x6e\145\x5f\x65\x6e\x64" => 19, "\x68\151\164" => 1, "\x6f\x75\164" => array(0 => 2147483645), "\x6f\165\x74\137\150\x69\x74" => array(0 => 0))), "\x70\x61\164\x68\x73" => array(0 => array("\x70\141\164\150" => array(0 => 0), "\150\151\164" => 1)))))))); } protected function getLineCoverageForBankAccount() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("\163\x74\x6f\x70")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\x42\x61\156\x6b\x41\x63\x63\157\x75\156\x74\56\x70\x68\160"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("\102\141\x6e\153\101\143\x63\157\x75\x6e\164\124\145\x73\164\x3a\72\x74\145\x73\164\x42\141\154\x61\x6e\143\145\x49\163\x49\156\151\x74\x69\141\154\154\171\132\x65\162\157", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\141\156\x6b\x41\143\x63\x6f\165\x6e\164\x2e\x70\150\x70" => range(6, 9))); $coverage->start("\x42\x61\156\153\101\x63\143\157\165\156\x74\124\x65\163\164\72\x3a\x74\x65\x73\164\102\141\x6c\x61\x6e\x63\x65\x43\141\x6e\x6e\157\164\102\145\x63\x6f\x6d\145\x4e\145\x67\x61\x74\x69\x76\x65"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\102\x61\x6e\153\101\x63\143\157\165\156\x74\56\160\150\160" => range(27, 32))); $coverage->start("\102\x61\x6e\153\101\143\x63\x6f\165\156\164\124\145\x73\164\x3a\72\x74\145\x73\x74\x42\141\154\x61\x6e\143\x65\x43\x61\156\156\157\164\102\x65\143\x6f\155\x65\116\145\147\x61\164\151\x76\x65\62"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\141\x6e\x6b\x41\x63\143\x6f\x75\156\164\x2e\x70\150\160" => range(20, 25))); $coverage->start("\x42\141\156\153\x41\143\143\x6f\165\156\x74\x54\145\163\x74\x3a\72\164\x65\163\x74\104\145\160\x6f\x73\151\x74\x57\151\x74\150\x64\162\141\x77\x4d\157\x6e\x65\x79"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\141\x6e\x6b\101\143\x63\157\165\x6e\164\x2e\160\x68\x70" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getPathCoverageForBankAccount() : CodeCoverage { $data = $this->getPathCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("\x63\157\x6c\154\x65\x63\x74\163\102\162\x61\156\x63\x68\x41\x6e\144\x50\141\x74\x68\x43\x6f\166\145\162\x61\147\145")->willReturn(true); $stub->method("\163\164\157\160")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\x42\141\156\153\101\x63\x63\157\x75\x6e\164\56\x70\x68\x70"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("\x42\141\156\x6b\101\143\x63\157\x75\156\164\x54\x65\x73\x74\72\72\164\145\x73\x74\102\141\154\141\156\143\145\111\163\111\156\x69\x74\x69\x61\x6c\x6c\x79\132\145\162\x6f", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "\102\x61\x6e\x6b\x41\143\143\x6f\x75\156\164\56\x70\x68\x70" => range(6, 9))); $coverage->start("\102\x61\156\153\101\143\x63\157\x75\156\164\124\145\x73\164\72\x3a\164\x65\163\x74\x42\x61\154\141\x6e\143\x65\103\x61\156\x6e\x6f\x74\x42\x65\x63\x6f\155\x65\116\145\147\x61\x74\151\x76\x65"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\x61\x6e\x6b\101\x63\143\x6f\165\156\x74\56\x70\150\x70" => range(27, 32))); $coverage->start("\x42\141\x6e\153\x41\143\x63\157\x75\x6e\164\x54\145\x73\164\72\x3a\x74\145\x73\x74\x42\141\x6c\141\x6e\x63\145\x43\x61\x6e\x6e\157\164\102\145\x63\x6f\x6d\x65\116\145\x67\x61\x74\151\x76\x65\x32"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\x61\156\153\x41\143\143\157\165\x6e\x74\56\x70\150\x70" => range(20, 25))); $coverage->start("\x42\141\156\x6b\x41\143\143\x6f\x75\156\x74\x54\x65\x73\164\x3a\x3a\164\x65\x73\x74\x44\x65\x70\157\163\151\x74\127\151\x74\x68\x64\x72\141\167\115\x6f\156\x65\x79"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\102\141\156\153\101\x63\143\157\x75\156\164\x2e\x70\150\160" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getPathCoverageForSourceWithoutNamespace() : CodeCoverage { $data = $this->getPathCoverageXdebugDataForSourceWithoutNamespace(); $stub = $this->createStub(Driver::class); $stub->method("\143\x6f\x6c\x6c\145\x63\x74\163\102\x72\141\156\x63\x68\101\156\x64\120\x61\164\x68\x43\x6f\166\x65\x72\x61\x67\145")->willReturn(true); $stub->method("\x73\164\157\160")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\163\x6f\x75\162\143\145\x5f\x77\151\164\x68\x6f\165\164\x5f\x6e\141\155\x65\x73\160\x61\x63\x65\56\x70\150\x70"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("\x66\141\x6b\x65\x74\x65\x73\164", null, true); $coverage->stop(); return $coverage; } protected function getXdebugDataForNamespacedBankAccount() { return array(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\116\x61\x6d\x65\163\x70\x61\143\x65\144\x42\141\x6e\x6b\101\x63\x63\157\x75\156\x74\56\160\150\x70" => array(13 => 1, 14 => -2, 18 => -1, 19 => -1, 20 => -1, 21 => -1, 23 => -1, 27 => -1, 29 => -1, 30 => -2, 34 => -1, 36 => -1, 37 => -2))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\x4e\x61\x6d\x65\x73\160\141\143\x65\x64\x42\x61\x6e\x6b\x41\143\x63\157\x75\156\x74\x2e\160\150\160" => array(13 => 1, 18 => 1, 21 => 1, 34 => 1))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\x4e\x61\x6d\x65\163\x70\141\x63\x65\x64\x42\x61\156\x6b\x41\x63\143\157\165\156\164\x2e\160\150\160" => array(13 => 1, 18 => 1, 21 => 1, 27 => 1))), RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\x4e\x61\155\145\163\160\x61\143\x65\144\102\141\x6e\x6b\101\143\x63\157\165\x6e\x74\56\160\150\160" => array(13 => 1, 18 => 1, 19 => 1, 20 => 1, 23 => 1, 27 => 1, 29 => 1, 34 => 1, 36 => 1)))); } protected function getLineCoverageForNamespacedBankAccount() : CodeCoverage { $data = $this->getXdebugDataForNamespacedBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("\x73\164\157\160")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\116\x61\x6d\x65\163\160\x61\143\x65\x64\x42\x61\156\x6b\101\x63\143\157\x75\156\164\56\x70\x68\160"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("\x42\141\156\153\101\x63\143\x6f\x75\156\x74\x54\145\163\x74\x3a\x3a\x74\x65\x73\x74\102\141\x6c\141\156\143\145\111\x73\111\156\x69\x74\151\141\x6c\154\x79\132\x65\162\x6f", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "\116\x61\x6d\145\163\160\x61\143\145\144\102\x61\x6e\x6b\x41\x63\143\157\x75\156\164\56\x70\x68\x70" => range(11, 14))); $coverage->start("\102\141\x6e\x6b\101\143\x63\x6f\x75\156\164\124\145\x73\164\x3a\72\x74\145\163\x74\x42\141\x6c\141\156\143\x65\103\x61\x6e\156\x6f\164\x42\145\x63\157\x6d\x65\116\x65\147\x61\x74\x69\x76\x65"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\116\x61\x6d\x65\x73\x70\141\143\145\144\x42\x61\x6e\153\101\143\143\157\x75\156\x74\x2e\x70\150\160" => range(32, 37))); $coverage->start("\102\141\156\153\101\x63\x63\x6f\x75\156\164\x54\x65\163\164\x3a\72\x74\x65\x73\164\102\x61\x6c\141\x6e\143\145\x43\x61\156\x6e\x6f\x74\x42\x65\x63\x6f\x6d\145\x4e\x65\147\141\x74\151\x76\x65\x32"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x4e\141\155\x65\x73\160\x61\x63\145\144\102\141\156\x6b\101\143\143\157\x75\156\164\56\160\x68\160" => range(25, 30))); $coverage->start("\x42\x61\x6e\153\x41\x63\x63\157\165\156\164\x54\145\x73\164\x3a\x3a\x74\145\x73\x74\x44\x65\160\157\x73\151\x74\x57\x69\x74\150\144\162\x61\x77\115\157\156\145\x79"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x4e\141\155\x65\163\x70\x61\143\x65\144\102\141\x6e\153\x41\143\x63\x6f\165\156\164\56\160\150\x70" => array_merge(range(11, 14), range(25, 30), range(32, 37)))); return $coverage; } protected function getLineCoverageForBankAccountForFirstTwoTests() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("\x73\x74\x6f\x70")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\x42\x61\156\x6b\x41\143\x63\x6f\165\156\164\x2e\160\150\x70"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("\102\x61\156\x6b\x41\x63\x63\157\165\x6e\164\x54\x65\163\x74\x3a\x3a\164\x65\163\164\x42\x61\154\x61\156\x63\145\x49\163\x49\x6e\151\x74\151\x61\x6c\154\171\132\145\x72\x6f", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "\102\x61\x6e\153\101\143\143\x6f\x75\x6e\x74\x2e\160\x68\160" => range(6, 9))); $coverage->start("\x42\141\156\x6b\101\143\143\x6f\165\156\x74\x54\145\x73\x74\72\x3a\x74\145\x73\x74\102\141\154\x61\x6e\143\x65\103\x61\156\156\x6f\164\x42\145\x63\157\155\x65\116\145\147\141\164\x69\x76\145"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\141\x6e\153\101\x63\143\x6f\x75\156\164\56\160\150\x70" => range(27, 32))); return $coverage; } protected function getLineCoverageForBankAccountForLastTwoTests() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("\x73\164\157\160")->willReturn($data[2], $data[3]); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\x42\141\156\153\x41\x63\x63\x6f\165\x6e\164\56\x70\x68\x70"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("\102\141\x6e\153\101\143\143\157\165\x6e\x74\x54\145\x73\164\x3a\x3a\164\x65\x73\164\x42\x61\154\x61\x6e\143\145\x43\141\156\156\x6f\164\x42\x65\143\x6f\x6d\x65\x4e\x65\x67\x61\x74\151\x76\145\62"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\102\x61\156\153\101\143\x63\x6f\165\x6e\164\x2e\160\150\160" => range(20, 25))); $coverage->start("\x42\141\x6e\x6b\x41\143\x63\157\165\156\x74\x54\x65\x73\x74\72\x3a\x74\145\163\164\104\x65\160\157\163\151\164\x57\x69\164\x68\x64\x72\141\167\x4d\x6f\x6e\145\171"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\102\141\156\x6b\x41\x63\143\x6f\165\x6e\164\x2e\x70\x68\160" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getExpectedLineCoverageDataArrayForBankAccount() : array { return array(TEST_FILES_PATH . "\102\141\156\x6b\x41\x63\143\157\165\156\164\x2e\x70\150\160" => array(8 => array(0 => "\102\x61\x6e\153\101\143\x63\157\x75\156\x74\x54\145\163\164\72\72\164\x65\163\164\x42\141\x6c\141\x6e\x63\x65\111\163\x49\x6e\151\164\x69\x61\154\x6c\x79\132\145\162\x6f", 1 => "\x42\141\x6e\153\101\143\x63\x6f\165\156\x74\x54\x65\163\x74\x3a\x3a\164\145\163\x74\104\145\x70\x6f\x73\x69\164\127\151\164\x68\x64\162\x61\167\115\157\156\x65\171"), 13 => array(), 14 => array(), 16 => array(), 22 => array(0 => "\102\141\156\x6b\101\143\x63\157\165\x6e\x74\124\x65\x73\x74\72\72\164\x65\163\164\x42\141\x6c\x61\156\x63\x65\x43\141\156\156\x6f\x74\x42\145\x63\157\x6d\145\116\145\x67\141\164\151\166\145\x32", 1 => "\x42\141\x6e\153\101\x63\143\x6f\165\x6e\x74\x54\145\163\x74\x3a\x3a\x74\145\163\164\104\145\160\x6f\x73\151\164\x57\151\164\150\144\x72\141\x77\115\157\156\145\x79"), 24 => array(0 => "\x42\141\x6e\153\x41\143\143\157\x75\x6e\x74\124\x65\x73\164\72\72\164\x65\163\164\x44\145\x70\x6f\x73\x69\164\127\x69\x74\150\144\162\141\x77\115\157\x6e\x65\171"), 29 => array(0 => "\x42\x61\x6e\153\x41\143\143\157\x75\156\164\x54\145\163\x74\72\72\x74\145\163\164\102\141\154\x61\156\143\145\x43\x61\x6e\156\157\x74\102\145\x63\x6f\155\x65\x4e\x65\x67\141\164\151\166\x65", 1 => "\x42\141\156\x6b\x41\x63\x63\x6f\x75\156\x74\124\x65\163\x74\72\x3a\164\145\x73\164\104\145\160\x6f\x73\x69\164\x57\x69\x74\x68\x64\x72\141\167\x4d\157\x6e\x65\171"), 31 => array(0 => "\x42\141\x6e\153\x41\143\x63\x6f\165\156\164\x54\x65\163\x74\x3a\72\x74\145\x73\164\104\145\x70\x6f\x73\151\164\127\x69\164\150\x64\162\141\x77\x4d\157\156\x65\171"), 32 => null)); } protected function getExpectedLineCoverageDataArrayForBankAccountInReverseOrder() : array { return array(TEST_FILES_PATH . "\x42\141\x6e\153\x41\143\x63\157\165\156\x74\56\x70\150\x70" => array(8 => array(0 => "\102\x61\156\x6b\101\x63\x63\157\x75\156\164\x54\x65\163\x74\72\72\x74\x65\163\164\104\145\160\x6f\163\x69\x74\127\151\164\150\x64\x72\x61\x77\x4d\x6f\x6e\145\171", 1 => "\x42\141\x6e\x6b\101\143\143\157\165\156\x74\x54\145\163\x74\x3a\72\164\x65\x73\164\x42\141\x6c\x61\156\x63\x65\x49\x73\x49\x6e\x69\x74\151\x61\154\154\x79\x5a\x65\x72\x6f"), 13 => array(), 14 => array(), 16 => array(), 22 => array(0 => "\x42\x61\156\153\x41\143\x63\x6f\x75\156\164\x54\145\163\x74\72\72\x74\145\x73\164\x42\141\154\x61\156\143\x65\103\141\156\156\157\164\102\x65\143\x6f\155\x65\116\x65\x67\x61\164\x69\x76\x65\x32", 1 => "\102\x61\156\x6b\101\143\x63\x6f\165\156\164\x54\x65\x73\x74\72\x3a\x74\145\163\164\104\x65\x70\157\x73\x69\164\x57\151\x74\150\x64\162\141\x77\115\157\x6e\x65\171"), 24 => array(0 => "\x42\x61\156\x6b\x41\x63\x63\x6f\165\156\x74\124\x65\x73\164\72\x3a\x74\145\163\x74\104\145\160\x6f\x73\151\164\x57\151\164\x68\x64\x72\x61\167\x4d\157\x6e\x65\x79"), 29 => array(0 => "\102\x61\156\x6b\x41\143\x63\x6f\x75\x6e\164\124\x65\163\x74\72\x3a\x74\145\x73\x74\x44\x65\160\x6f\x73\151\164\x57\x69\x74\150\144\x72\141\x77\115\x6f\156\x65\171", 1 => "\102\x61\156\153\x41\143\x63\157\165\x6e\164\x54\x65\163\x74\x3a\x3a\164\x65\x73\x74\x42\141\154\x61\156\143\x65\x43\141\x6e\156\157\164\x42\145\143\x6f\155\145\x4e\145\x67\141\x74\151\x76\x65"), 31 => array(0 => "\x42\141\x6e\153\x41\143\143\x6f\x75\156\x74\x54\145\x73\x74\x3a\x3a\x74\x65\163\x74\104\145\x70\157\163\x69\x74\127\151\x74\150\144\x72\141\x77\115\157\x6e\x65\171"), 32 => null)); } protected function getPathCoverageForBankAccountForFirstTwoTests() : CodeCoverage { $data = $this->getPathCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("\163\x74\157\x70")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\x42\141\x6e\153\101\x63\143\157\165\156\x74\56\160\x68\160"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("\102\x61\x6e\153\101\143\x63\x6f\x75\x6e\164\124\145\x73\164\x3a\72\x74\x65\163\164\102\x61\x6c\141\x6e\143\145\111\x73\x49\x6e\x69\x74\x69\x61\x6c\154\x79\132\145\162\x6f", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "\102\x61\156\x6b\101\143\x63\x6f\165\x6e\164\x2e\x70\x68\x70" => range(6, 9))); $coverage->start("\102\141\x6e\x6b\101\x63\143\157\x75\156\164\124\x65\163\164\72\72\164\145\163\164\102\141\x6c\x61\x6e\143\145\x43\141\x6e\x6e\x6f\164\102\145\143\x6f\x6d\145\116\145\147\x61\x74\151\166\145"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\x61\x6e\153\101\x63\143\157\165\x6e\x74\x2e\160\x68\160" => range(27, 32))); return $coverage; } protected function getPathCoverageForBankAccountForLastTwoTests() : CodeCoverage { $data = $this->getPathCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("\x73\164\x6f\160")->willReturn($data[2], $data[3]); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\102\141\x6e\x6b\x41\x63\143\x6f\165\156\x74\x2e\x70\150\x70"); $coverage = new CodeCoverage($stub, $filter); $coverage->start("\x42\x61\156\x6b\101\143\x63\157\165\x6e\x74\124\x65\163\164\72\x3a\x74\145\x73\164\102\x61\x6c\141\156\143\x65\103\x61\156\x6e\x6f\x74\102\x65\x63\157\x6d\145\x4e\x65\x67\141\164\151\166\145\x32"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\141\156\x6b\x41\143\143\157\x75\156\x74\56\160\x68\160" => range(20, 25))); $coverage->start("\102\x61\156\x6b\x41\143\x63\157\165\156\x74\124\x65\163\164\x3a\72\164\x65\x73\164\x44\x65\x70\157\x73\151\164\x57\x69\x74\150\144\x72\141\x77\115\157\156\145\x79"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\x61\156\153\x41\143\143\x6f\165\x6e\x74\56\x70\x68\x70" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getExpectedPathCoverageDataArrayForBankAccount() : array { return array(TEST_FILES_PATH . "\x42\x61\x6e\153\x41\x63\x63\157\x75\156\164\56\x70\x68\x70" => array("\102\141\156\153\x41\x63\143\157\x75\156\x74\55\76\x64\145\x70\157\163\151\164\115\x6f\x6e\145\171" => array("\x62\x72\141\x6e\143\x68\145\x73" => array(0 => array("\157\160\x5f\x73\164\x61\x72\x74" => 0, "\157\160\x5f\145\x6e\x64" => 14, "\x6c\151\x6e\x65\x5f\163\164\141\162\x74" => 20, "\154\x69\x6e\145\x5f\x65\x6e\x64" => 25, "\x68\x69\164" => array(0 => "\x42\x61\x6e\153\x41\x63\143\x6f\165\156\x74\124\x65\163\x74\72\x3a\164\145\163\164\x42\141\x6c\x61\x6e\143\x65\x43\141\156\156\x6f\x74\102\x65\x63\157\x6d\x65\x4e\145\147\x61\x74\151\x76\x65\x32", 1 => "\x42\141\156\x6b\101\143\x63\157\165\156\164\124\145\163\x74\x3a\x3a\164\145\x73\164\x44\145\160\x6f\163\151\164\127\x69\164\x68\144\162\141\167\115\x6f\156\145\x79"), "\x6f\165\164" => array(), "\x6f\165\x74\x5f\x68\x69\x74" => array())), "\160\x61\164\150\x73" => array(0 => array("\160\x61\x74\150" => array(0 => 0), "\150\151\164" => array(0 => "\x42\x61\156\153\x41\x63\x63\157\165\156\164\124\145\163\x74\x3a\x3a\x74\x65\x73\164\x42\x61\154\141\156\143\145\x43\141\156\156\157\x74\102\145\x63\x6f\x6d\145\116\x65\147\x61\164\x69\166\x65\x32", 1 => "\102\x61\156\x6b\x41\143\143\157\x75\156\164\x54\145\x73\x74\72\72\x74\145\x73\x74\104\x65\160\157\x73\151\164\x57\x69\164\150\144\162\141\167\x4d\157\156\145\x79")))), "\x42\141\156\x6b\101\x63\x63\157\x75\x6e\x74\x2d\x3e\x67\145\164\102\141\154\x61\x6e\x63\145" => array("\142\162\141\x6e\143\x68\x65\163" => array(0 => array("\x6f\160\x5f\163\164\x61\x72\164" => 0, "\157\160\137\x65\x6e\x64" => 5, "\x6c\151\x6e\x65\x5f\x73\x74\141\x72\164" => 6, "\x6c\x69\156\145\137\145\156\144" => 9, "\x68\x69\164" => array(0 => "\102\x61\156\x6b\101\x63\143\x6f\x75\156\164\x54\x65\x73\164\72\x3a\164\x65\x73\x74\x42\x61\x6c\x61\x6e\x63\145\x49\163\x49\156\x69\x74\x69\141\154\x6c\171\132\145\x72\157", 1 => "\102\141\x6e\x6b\x41\143\x63\x6f\x75\x6e\x74\124\x65\x73\164\72\x3a\x74\145\163\164\x44\x65\x70\157\163\151\x74\127\x69\164\150\144\162\141\x77\115\157\156\x65\x79"), "\x6f\165\164" => array(), "\x6f\165\164\137\150\151\x74" => array())), "\160\141\164\150\x73" => array(0 => array("\160\141\164\150" => array(0 => 0), "\x68\151\x74" => array(0 => "\x42\141\x6e\153\x41\143\143\x6f\165\x6e\x74\124\x65\163\164\x3a\72\x74\x65\x73\164\x42\x61\154\x61\156\143\x65\x49\x73\111\x6e\x69\164\151\141\x6c\x6c\x79\132\x65\x72\157", 1 => "\x42\x61\156\153\101\143\x63\x6f\165\x6e\x74\x54\x65\163\x74\x3a\72\x74\x65\x73\x74\104\145\x70\157\163\151\164\x57\151\164\150\144\162\x61\167\115\x6f\156\x65\171")))), "\102\141\x6e\153\101\x63\x63\157\165\156\x74\55\x3e\x77\x69\164\150\x64\x72\141\167\x4d\157\x6e\145\x79" => array("\142\162\141\156\143\x68\x65\163" => array(0 => array("\157\x70\x5f\163\x74\x61\162\x74" => 0, "\x6f\x70\137\x65\156\x64" => 14, "\x6c\x69\156\x65\137\163\x74\x61\162\164" => 27, "\x6c\151\x6e\145\137\145\156\x64" => 32, "\x68\x69\164" => array(0 => "\102\141\156\x6b\x41\x63\x63\157\x75\x6e\x74\x54\x65\x73\164\x3a\x3a\164\x65\x73\x74\x42\141\154\x61\156\x63\x65\x43\x61\x6e\x6e\x6f\x74\102\x65\x63\x6f\155\145\x4e\x65\147\141\x74\151\166\145", 1 => "\102\x61\x6e\x6b\x41\x63\x63\x6f\165\156\x74\124\x65\x73\x74\72\72\x74\x65\x73\164\x44\145\160\157\x73\x69\164\127\151\x74\x68\x64\162\x61\x77\115\x6f\x6e\145\171"), "\157\x75\164" => array(), "\157\x75\164\x5f\150\x69\164" => array())), "\160\x61\x74\x68\163" => array(0 => array("\160\x61\x74\150" => array(0 => 0), "\x68\x69\x74" => array(0 => "\x42\x61\x6e\x6b\x41\x63\143\x6f\165\x6e\x74\124\x65\x73\164\x3a\x3a\164\145\163\x74\102\141\x6c\141\x6e\143\145\x43\141\x6e\x6e\157\x74\x42\x65\x63\x6f\x6d\145\116\145\x67\141\164\x69\x76\x65", 1 => "\102\141\x6e\x6b\x41\143\x63\x6f\x75\156\164\124\145\x73\164\72\72\164\x65\x73\164\104\145\x70\157\x73\151\x74\127\x69\164\150\x64\x72\141\167\x4d\157\x6e\145\171")))), "\173\155\x61\151\156\175" => array("\142\162\141\x6e\143\150\145\163" => array(0 => array("\157\x70\137\x73\x74\141\x72\x74" => 0, "\157\x70\x5f\x65\156\144" => 1, "\x6c\x69\156\x65\137\x73\164\x61\162\x74" => 34, "\x6c\151\156\145\x5f\x65\156\x64" => 34, "\150\151\164" => array(), "\157\x75\x74" => array(0 => 2147483645), "\157\x75\x74\x5f\x68\151\164" => array(0 => 0))), "\160\x61\164\x68\163" => array(0 => array("\160\x61\x74\150" => array(0 => 0), "\x68\151\x74" => array()))), "\102\141\156\x6b\x41\x63\x63\x6f\x75\156\x74\x2d\x3e\x73\x65\164\x42\141\154\141\x6e\143\145" => array("\142\162\x61\156\x63\x68\145\x73" => array(0 => array("\x6f\x70\137\163\x74\x61\162\164" => 0, "\x6f\160\x5f\x65\156\144" => 4, "\x6c\x69\156\x65\137\x73\164\x61\x72\164" => 11, "\154\x69\156\145\x5f\x65\x6e\x64" => 13, "\x68\151\x74" => array(), "\x6f\x75\x74" => array(0 => 5, 1 => 9), "\x6f\165\164\137\150\x69\164" => array(0 => 0, 1 => 0)), 5 => array("\x6f\160\x5f\x73\164\x61\x72\x74" => 5, "\x6f\160\137\145\156\144" => 8, "\154\x69\x6e\145\x5f\163\x74\x61\162\x74" => 14, "\x6c\x69\x6e\145\137\x65\x6e\x64" => 14, "\150\x69\164" => array(), "\157\165\x74" => array(0 => 13), "\x6f\165\x74\137\x68\x69\164" => array(0 => 0)), 9 => array("\x6f\x70\137\163\x74\x61\x72\x74" => 9, "\157\x70\137\x65\156\144" => 12, "\154\151\156\145\x5f\163\164\141\162\164" => 16, "\x6c\x69\x6e\145\x5f\x65\x6e\x64" => 16, "\150\151\x74" => array(), "\157\165\164" => array(0 => 2147483645), "\157\165\x74\137\x68\x69\x74" => array(0 => 0)), 13 => array("\157\x70\137\x73\x74\141\x72\x74" => 13, "\x6f\x70\x5f\x65\x6e\144" => 14, "\154\x69\x6e\145\x5f\163\x74\x61\x72\164" => 18, "\x6c\151\x6e\145\x5f\x65\x6e\x64" => 18, "\x68\x69\164" => array(), "\157\165\x74" => array(0 => 2147483645), "\x6f\165\164\137\x68\151\164" => array(0 => 0))), "\x70\x61\x74\150\x73" => array(0 => array("\x70\141\164\150" => array(0 => 0, 1 => 5, 2 => 13), "\150\151\x74" => array()), 1 => array("\160\141\x74\150" => array(0 => 0, 1 => 9), "\150\x69\164" => array()))))); } protected function getCoverageForFileWithIgnoredLines() : CodeCoverage { $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\x73\x6f\165\162\x63\x65\x5f\x77\151\x74\x68\x5f\151\147\x6e\x6f\x72\x65\56\x70\150\160"); $coverage = new CodeCoverage($this->setUpXdebugStubForFileWithIgnoredLines(), $filter); $coverage->start("\106\x69\154\x65\x57\151\x74\x68\x49\147\x6e\x6f\x72\145\x64\114\151\156\x65\x73", null, true); $coverage->stop(); return $coverage; } protected function setUpXdebugStubForFileWithIgnoredLines() : Driver { $stub = $this->createStub(Driver::class); $stub->method("\x73\164\x6f\160")->willReturn(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\163\x6f\x75\162\143\x65\137\x77\x69\x74\150\x5f\151\x67\156\157\x72\145\56\x70\x68\x70" => array(2 => 1, 4 => -1, 6 => -1)))); return $stub; } protected function getLineCoverageForFileWithEval() : CodeCoverage { $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\163\157\165\162\x63\x65\137\x77\151\x74\150\137\145\166\141\x6c\56\160\x68\x70"); $coverage = new CodeCoverage($this->setUpXdebugStubForFileWithEval(), $filter); $coverage->start("\106\151\154\145\x57\151\x74\x68\105\x76\141\154", null, true); $coverage->stop(); return $coverage; } protected function setUpXdebugStubForFileWithEval() : Driver { $stub = $this->createStub(Driver::class); $stub->method("\163\x74\x6f\160")->willReturn(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\163\x6f\x75\x72\x63\x65\x5f\x77\x69\164\150\x5f\145\x76\x61\x6c\56\x70\x68\160" => array(3 => 1, 5 => 1), TEST_FILES_PATH . "\x73\157\x75\x72\143\145\137\x77\151\x74\150\x5f\x65\166\x61\154\56\x70\150\x70\50\65\51\40\x3a\x20\x65\x76\x61\154\50\51\x27\144\40\143\157\144\x65" => array(1 => 1)))); return $stub; } protected function getCoverageForClassWithAnonymousFunction() : CodeCoverage { $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\163\157\165\x72\143\x65\137\x77\151\x74\x68\137\x63\154\x61\163\x73\137\x61\x6e\x64\137\x61\x6e\157\156\171\155\157\165\163\137\x66\165\156\x63\x74\x69\157\156\56\x70\150\x70"); $coverage = new CodeCoverage($this->setUpXdebugStubForClassWithAnonymousFunction(), $filter); $coverage->start("\103\x6c\141\x73\x73\127\x69\164\x68\x41\156\x6f\x6e\x79\155\x6f\x75\163\106\x75\x6e\143\164\x69\x6f\x6e", null, true); $coverage->stop(); return $coverage; } protected function setUpXdebugStubForClassWithAnonymousFunction() : Driver { $stub = $this->createStub(Driver::class); $stub->method("\x73\x74\157\x70")->willReturn(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\x73\157\165\x72\143\145\x5f\167\151\x74\x68\x5f\143\x6c\x61\x73\163\x5f\141\156\x64\137\141\x6e\x6f\156\x79\x6d\x6f\165\163\x5f\x66\165\x6e\x63\x74\x69\x6f\x6e\x2e\160\150\x70" => array(7 => 1, 9 => 1, 10 => -1, 11 => 1, 12 => 1, 13 => 1, 14 => 1, 17 => 1, 18 => 1)))); return $stub; } protected function getCoverageForClassWithOutsideFunction() : CodeCoverage { $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\x73\x6f\x75\162\143\x65\137\x77\151\x74\x68\137\x63\154\141\163\163\137\x61\x6e\x64\137\157\165\x74\163\x69\x64\145\137\146\165\x6e\143\164\x69\157\x6e\56\160\150\x70"); $coverage = new CodeCoverage($this->setUpXdebugStubForClassWithOutsideFunction(), $filter); $coverage->start("\103\154\141\163\x73\127\151\x74\150\117\x75\164\163\151\144\x65\x46\165\156\x63\x74\151\157\156", null, true); $coverage->stop(); return $coverage; } protected function setUpXdebugStubForClassWithOutsideFunction() : Driver { $stub = $this->createStub(Driver::class); $stub->method("\x73\164\x6f\160")->willReturn(RawCodeCoverageData::fromXdebugWithoutPathCoverage(array(TEST_FILES_PATH . "\163\x6f\165\x72\143\x65\137\167\x69\x74\x68\137\143\x6c\141\163\163\x5f\x61\x6e\144\x5f\x6f\x75\x74\x73\151\144\145\x5f\146\x75\x6e\x63\164\x69\x6f\156\56\x70\150\160" => array(6 => 1, 12 => 1, 13 => 1, 16 => -1)))); return $stub; } protected function removeTemporaryFiles() : void { $tmpFilesIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(self::$TEST_TMP_PATH, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST); foreach ($tmpFilesIterator as $path => $fileInfo) { $pathname = $fileInfo->getPathname(); $fileInfo->isDir() ? rmdir($pathname) : unlink($pathname); } } protected function getCoverageForFilesWithUncoveredIncluded() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("\x73\164\x6f\x70")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\102\141\156\153\101\x63\143\x6f\165\x6e\164\x2e\x70\150\160"); $filter->includeFile(TEST_FILES_PATH . "\116\141\x6d\145\x73\x70\x61\143\145\x64\102\141\x6e\x6b\x41\143\143\157\165\156\x74\x2e\160\x68\160"); $coverage = new CodeCoverage($stub, $filter); $coverage->includeUncoveredFiles(); $coverage->start("\102\x61\x6e\153\101\143\143\157\x75\156\x74\x54\x65\x73\164\72\x3a\x74\145\163\164\x42\x61\x6c\141\x6e\143\x65\111\x73\111\156\x69\x74\151\141\154\154\171\x5a\x65\162\157", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\141\156\153\101\x63\x63\x6f\165\x6e\x74\x2e\160\150\160" => range(6, 9))); $coverage->start("\102\x61\x6e\153\101\143\143\x6f\x75\x6e\x74\x54\x65\163\x74\72\x3a\x74\x65\163\x74\x42\x61\154\x61\x6e\x63\x65\103\x61\x6e\156\x6f\164\102\x65\143\157\x6d\x65\x4e\145\147\x61\164\x69\x76\x65"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\x61\x6e\153\101\x63\143\157\x75\x6e\x74\x2e\x70\x68\160" => range(27, 32))); $coverage->start("\102\141\156\153\x41\x63\x63\x6f\165\x6e\164\x54\145\163\x74\x3a\72\x74\x65\163\164\102\x61\x6c\141\x6e\x63\145\103\141\x6e\x6e\x6f\164\102\145\x63\157\x6d\x65\116\145\x67\141\164\151\x76\145\62"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\102\141\x6e\153\x41\x63\143\157\165\x6e\164\x2e\x70\x68\160" => range(20, 25))); $coverage->start("\x42\x61\x6e\153\101\143\143\157\x75\x6e\164\x54\145\163\164\x3a\x3a\x74\x65\x73\164\104\x65\x70\x6f\x73\x69\164\x57\151\x74\x68\x64\162\x61\x77\x4d\x6f\156\145\x79"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\x61\156\x6b\101\x63\143\x6f\165\156\164\x2e\x70\150\x70" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } protected function getCoverageForFilesWithUncoveredExcluded() : CodeCoverage { $data = $this->getLineCoverageXdebugDataForBankAccount(); $stub = $this->createStub(Driver::class); $stub->method("\163\164\157\160")->willReturn(...$data); $filter = new Filter(); $filter->includeFile(TEST_FILES_PATH . "\102\141\x6e\x6b\101\143\x63\157\165\156\164\x2e\160\x68\160"); $filter->includeFile(TEST_FILES_PATH . "\x4e\x61\155\x65\163\x70\x61\143\145\x64\x42\141\156\x6b\101\x63\143\x6f\x75\x6e\x74\56\160\x68\x70"); $coverage = new CodeCoverage($stub, $filter); $coverage->excludeUncoveredFiles(); $coverage->start("\102\x61\x6e\153\x41\x63\x63\x6f\165\x6e\x74\x54\145\x73\x74\72\72\164\145\163\164\102\141\154\141\x6e\143\145\x49\163\x49\x6e\x69\x74\x69\x61\x6c\x6c\x79\132\145\162\157", null, true); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\141\156\153\101\x63\143\157\165\x6e\164\56\x70\150\160" => range(6, 9))); $coverage->start("\102\141\x6e\x6b\101\143\x63\157\165\156\164\x54\x65\x73\x74\x3a\72\164\x65\x73\x74\102\x61\154\141\x6e\x63\145\x43\141\x6e\x6e\157\164\102\x65\x63\x6f\x6d\145\116\145\147\x61\x74\151\x76\145"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\x61\156\x6b\x41\x63\x63\157\x75\x6e\164\x2e\x70\150\x70" => range(27, 32))); $coverage->start("\102\x61\x6e\153\101\x63\143\x6f\165\156\164\124\x65\x73\164\x3a\72\x74\145\163\164\x42\141\x6c\x61\156\143\x65\x43\141\x6e\x6e\x6f\164\102\x65\x63\x6f\x6d\145\116\145\x67\x61\x74\x69\166\x65\x32"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\141\x6e\153\101\x63\x63\x6f\x75\x6e\164\56\x70\150\160" => range(20, 25))); $coverage->start("\102\x61\x6e\x6b\101\x63\x63\x6f\165\x6e\x74\124\145\x73\x74\72\72\164\x65\x73\164\104\x65\160\x6f\163\x69\x74\x57\151\164\150\144\x72\141\167\x4d\157\x6e\145\x79"); $coverage->stop(true, null, array(TEST_FILES_PATH . "\x42\141\x6e\x6b\101\143\x63\x6f\x75\x6e\164\56\160\x68\x70" => array_merge(range(6, 9), range(20, 25), range(27, 32)))); return $coverage; } }

Function Calls

None

Variables

None

Stats

MD5 63349504098a72edeaa8469120efcb3d
Eval Count 0
Decode Time 127 ms