Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UtilTest.php 685B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. * This file is part of the php-code-coverage package.
  4. *
  5. * (c) Sebastian Bergmann <sebastian@phpunit.de>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace SebastianBergmann\CodeCoverage;
  11. use PHPUnit\Framework\TestCase;
  12. /**
  13. * @covers SebastianBergmann\CodeCoverage\Util
  14. */
  15. class UtilTest extends TestCase
  16. {
  17. public function testPercent()
  18. {
  19. $this->assertEquals(100, Util::percent(100, 0));
  20. $this->assertEquals(100, Util::percent(100, 100));
  21. $this->assertEquals(
  22. '100.00%',
  23. Util::percent(100, 100, true)
  24. );
  25. }
  26. }