getConfigurationMock(); $driver = $this->getFFMpegDriverMock(); $driver->expects($this->any()) ->method('getConfiguration') ->will($this->returnValue($configuration)); $ffprobe = $this->getFFProbeMock(); $start = $this->getTimeCodeMock(); $start->expects($this->once()) ->method('__toString') ->will($this->returnValue($startValue)); $duration = null; if (null !== $durationValue) { $duration = $this->getTimeCodeMock(); $duration->expects($this->once()) ->method('__toString') ->will($this->returnValue($durationValue)); } $outputPathfile = '/target/file'; $format = $this->getMockBuilder('FFMpeg\Format\VideoInterface')->getMock(); $format->expects($this->any()) ->method('getPasses') ->will($this->returnValue(1)); $format->expects($this->any()) ->method('getExtraParams') ->will($this->returnValue([])); $clip = new Clip($this->getVideoMock(__FILE__), $driver, $ffprobe, $start, $duration); $fc = $clip->getFinalCommand($format, $outputPathfile); $this->assertCount(1, $fc); $this->assertStringStartsWith(implode(' ', $commands), $fc[0]); } public function provideBuildOptions() { return [ ['SS01', null, [ '-y', '-ss', 'SS01', '-i', __FILE__, ], ], ['SS02', 'D02', [ '-y', '-ss', 'SS02', '-i', __FILE__, '-t', 'D02', ], ], ]; } }