Version 0.3
This commit is contained in:
		
					parent
					
						
							
								0d69145ec3
							
						
					
				
			
			
				commit
				
					
						ad3a5af623
					
				
			
		
					 130 changed files with 7283 additions and 2627 deletions
				
			
		
							
								
								
									
										38
									
								
								tests/FFMpeg/Tests/Coordinate/TimeCodeTest.php
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								tests/FFMpeg/Tests/Coordinate/TimeCodeTest.php
									
										
									
									
									
										Normal 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'); | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue