Skip to content

Commit

Permalink
Update Windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin de Keijzer committed Apr 3, 2018
1 parent 8f105f4 commit 8d46a2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/Broadcaster/Windows/SchedulerCommandsWindowsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testStopProcess(): void
$exec->expects(static::once())->willReturnCallback(
// phpcs:disable Symfony.Functions.ReturnType.Invalid
function ($command) {
self::assertEquals('TASKKILL /PID 1337 /T', $command);
self::assertEquals('START /B TASKKILL /PID 1337 /T', $command);

return 'killed';
}
Expand All @@ -49,7 +49,7 @@ public function testGetRunningProcesses(): void
$exec = $this->getFunctionMock('Martin1982\LiveBroadcastBundle\Broadcaster\Windows', 'exec');
$exec->expects(static::once())->willReturnCallback(
function ($command, &$output) {
self::assertEquals('TASKLIST /FI "IMAGENAME eq ffmpeg.exe" /FO CSV', $command);
self::assertEquals('START /B TASKLIST /FI "IMAGENAME eq ffmpeg.exe" /FO CSV', $command);
// @codingStandardsIgnoreLine
$output[] = '1234 ffmpeg -re -i /path/to/video.mp4 -vcodec copy -acodec copy -f flv rtmp://live-ams.twitch.tv/app/ -metadata env=unittest -metadata broadcast_id=1337';
}
Expand All @@ -68,7 +68,7 @@ public function testExecStreamCommand(): void
$exec = $this->getFunctionMock('Martin1982\LiveBroadcastBundle\Broadcaster\Windows', 'exec');
$exec->expects(static::once())
// @codingStandardsIgnoreLine
->with('ffmpeg -stream_loop -1 input output -metadata x=y -metadata a=b -metadata env=unittest >nul 2>nul &')
->with('START /B ffmpeg -stream_loop -1 input output -metadata x=y -metadata a=b -metadata env=unittest >nul 2>nul &')
->willReturn('Streaming...');

$command = new SchedulerCommands('/some/directory', 'unittest');
Expand Down

0 comments on commit 8d46a2e

Please sign in to comment.