mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
38 lines
860 B
PHP
38 lines
860 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea\Command;
|
|
|
|
use Alchemy\Phrasea\Command\Command;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
class CommandTest extends \PhraseanetTestCase
|
|
{
|
|
/**
|
|
* @var Command
|
|
*/
|
|
protected $object;
|
|
|
|
public function setUp()
|
|
{
|
|
$this->object = new AbstractCommandTester('name');
|
|
}
|
|
|
|
/**
|
|
* @covers Alchemy\Phrasea\Command\Command::getFormattedDuration
|
|
*/
|
|
public function testGetFormattedDuration()
|
|
{
|
|
$this->assertRegExp('/50 \w+/', $this->object->getFormattedDuration(50));
|
|
$this->assertRegExp('/1(\.|,)2 \w+/', $this->object->getFormattedDuration(70));
|
|
}
|
|
}
|
|
|
|
class AbstractCommandTester extends Command
|
|
{
|
|
protected function doExecute(InputInterface $input, OutputInterface $output)
|
|
{
|
|
|
|
}
|
|
}
|