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
11namespace SebastianBergmann\CodeCoverage;
12
13/**
14 * @covers SebastianBergmann\CodeCoverage\Util
15 */
16class UtilTest extends \PHPUnit_Framework_TestCase
17{
18    public function testPercent()
19    {
20        $this->assertEquals(100, Util::percent(100, 0));
21        $this->assertEquals(100, Util::percent(100, 100));
22        $this->assertEquals(
23            '100.00%',
24            Util::percent(100, 100, true)
25        );
26    }
27}
28