PATH:
home
/
centosnipponia
/
public_html
/
apptt-oldgit
/
vendor
/
phpunit
/
php-code-coverage
/
tests
/
_files
<?php use PHPUnit\Framework\TestCase; class BankAccountTest extends TestCase { protected $ba; protected function setUp(): void { $this->ba = new BankAccount; } /** * @covers BankAccount::getBalance */ public function testBalanceIsInitiallyZero() { $this->assertEquals(0, $this->ba->getBalance()); } /** * @covers BankAccount::withdrawMoney */ public function testBalanceCannotBecomeNegative() { try { $this->ba->withdrawMoney(1); } catch (RuntimeException $e) { $this->assertEquals(0, $this->ba->getBalance()); return; } $this->fail(); } /** * @covers BankAccount::depositMoney */ public function testBalanceCannotBecomeNegative2() { try { $this->ba->depositMoney(-1); } catch (RuntimeException $e) { $this->assertEquals(0, $this->ba->getBalance()); return; } $this->fail(); } /** * @covers BankAccount::getBalance * @covers BankAccount::depositMoney * @covers BankAccount::withdrawMoney */ public function testDepositWithdrawMoney() { $this->assertEquals(0, $this->ba->getBalance()); $this->ba->depositMoney(1); $this->assertEquals(1, $this->ba->getBalance()); $this->ba->withdrawMoney(1); $this->assertEquals(0, $this->ba->getBalance()); } }
[+]
..
[-] NamespaceCoverageProtectedTest.php
[edit]
[-] source_without_ignore.php
[edit]
[-] CoveragePrivateTest.php
[edit]
[-] NamespaceCoveragePrivateTest.php
[edit]
[-] source_without_namespace.php
[edit]
[-] CoverageClassExtendedTest.php
[edit]
[-] NamespaceCoverageCoversClassTest.php
[edit]
[-] NamespaceCoveragePublicTest.php
[edit]
[-] NamespaceCoverageNotPrivateTest.php
[edit]
[-] class-with-anonymous-function-clover.xml
[edit]
[-] NamespaceCoverageNotPublicTest.php
[edit]
[-] Crash.php
[edit]
[-] source_with_namespace.php
[edit]
[-] CoverageMethodParenthesesWhitespaceTest.php
[edit]
[-] CoverageProtectedTest.php
[edit]
[-] source_with_use_statements.php
[edit]
[-] CoveredClass.php
[edit]
[-] CoverageMethodOneLineAnnotationTest.php
[edit]
[-] CoveragePublicTest.php
[edit]
[-] CoverageNotProtectedTest.php
[edit]
[-] NamespaceCoverageCoversClassPublicTest.php
[edit]
[-] CoverageClassTest.php
[edit]
[-] BankAccount-crap4j.xml
[edit]
[-] CoverageNotPrivateTest.php
[edit]
[-] NamespaceCoverageClassExtendedTest.php
[edit]
[-] CoverageFunctionParenthesesTest.php
[edit]
[-] source_with_class_and_anonymous_function.php
[edit]
[-] CoverageFunctionTest.php
[edit]
[-] NamespaceCoveredClass.php
[edit]
[-] ignored-lines-text.txt
[edit]
[-] NamespaceCoverageClassTest.php
[edit]
[-] source_with_oneline_annotations.php
[edit]
[-] BankAccount-clover.xml
[edit]
[-] NamespaceCoverageNotProtectedTest.php
[edit]
[+]
Report
[-] class-with-anonymous-function-crap4j.xml
[edit]
[-] BankAccountTest.php
[edit]
[-] CoverageMethodTest.php
[edit]
[-] BankAccount-text.txt
[edit]
[-] ignored-lines-crap4j.xml
[edit]
[-] CoverageNothingTest.php
[edit]
[-] NotExistingCoveredElementTest.php
[edit]
[-] CoveredFunction.php
[edit]
[-] NamespaceCoverageMethodTest.php
[edit]
[-] CoverageMethodParenthesesTest.php
[edit]
[-] class-with-anonymous-function-text.txt
[edit]
[-] CoverageNotPublicTest.php
[edit]
[-] CoverageFunctionParenthesesWhitespaceTest.php
[edit]
[-] BankAccount.php
[edit]
[-] CoverageTwoDefaultClassAnnotations.php
[edit]
[-] ignored-lines-clover.xml
[edit]
[-] CoverageNoneTest.php
[edit]
[-] source_with_ignore.php
[edit]
[-] .htaccess.disabled
[edit]