Version 0.3

This commit is contained in:
Romain Neutron 2013-06-25 10:03:20 +02:00
commit ad3a5af623
130 changed files with 7283 additions and 2627 deletions

View file

@ -0,0 +1,38 @@
<?php
namespace FFMpeg\Tests\Coordinate;
use FFMpeg\Tests\TestCase;
use FFMpeg\Coordinate\TimeCode;
class TimeCodeTest extends TestCase
{
/**
* @dataProvider provideTimecodes
*/
public function testFromString($timecode, $expected)
{
$tc = TimeCode::fromString($timecode);
$this->assertEquals((string) $tc, $expected);
}
public function provideTimeCodes()
{
return array(
array('1:02:04:05:20', '26:04:05.20'),
array('1:02:04:05.20', '26:04:05.20'),
array('02:04:05:20', '02:04:05.20'),
array('02:04:05.20', '02:04:05.20'),
array('00:00:05.20', '00:00:05.20'),
array('00:00:00.00', '00:00:00.00'),
);
}
/**
* @expectedException FFMpeg\Exception\InvalidArgumentException
*/
public function testFromInvalidString()
{
TimeCode::fromString('lalali lala');
}
}