You are here

public function PHP_CodeCoverage_UtilTest::testPercent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php \PHP_CodeCoverage_UtilTest::testPercent()

@covers PHP_CodeCoverage_Util::percent

File

vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php, line 21

Class

PHP_CodeCoverage_UtilTest
Tests for the PHP_CodeCoverage_Util class.

Code

public function testPercent() {
  $this
    ->assertEquals(100, PHP_CodeCoverage_Util::percent(100, 0));
  $this
    ->assertEquals(100, PHP_CodeCoverage_Util::percent(100, 100));
  $this
    ->assertEquals('100.00%', PHP_CodeCoverage_Util::percent(100, 100, true));
}