4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Console\Tests\Helper;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Console\Helper\Helper;
17 class HelperTest extends TestCase
19 public function formatTimeProvider()
31 array(3599, '59 mins'),
36 array(86399, '23 hrs'),
37 array(86400, '1 day'),
38 array(86401, '1 day'),
39 array(172799, '1 day'),
40 array(172800, '2 days'),
41 array(172801, '2 days'),
46 * @dataProvider formatTimeProvider
49 * @param string $expectedFormat
51 public function testFormatTime($secs, $expectedFormat)
53 $this->assertEquals($expectedFormat, Helper::formatTime($secs));