\"\$last\"\n"); chmod($fake, 0755); define('ZM_PATH_FFMPEG', $fake); define('ZM_FFMPEG_INPUT_OPTIONS', ''); define('ZM_FFMPEG_OUTPUT_OPTIONS', ''); define('ZM_EVENT_IMAGE_DIGITS', 5); require_once __DIR__.'/../../web/includes/Event.php'; class TestEvent extends Event { public function Path() { return $GLOBALS['eventdir']; } } $event = new TestEvent(array('Id' => 3, 'Name' => 'one frame', 'Width' => 160, 'Height' => 120, 'Frames' => 1, 'Length' => 0, 'DefaultVideo' => '')); $file = null; try { $file = $event->GenerateVideo(); } catch (\Throwable $e) { $file = get_class($e); } check('an event with no length still gets a video', $file, 'one_frame.mp4'); echo "\n$passes passed, $failures failed\n"; array_map('unlink', glob($eventdir.'/*')); @rmdir($eventdir); array_map('unlink', glob($stubdir.'/*')); @rmdir($stubdir); exit($failures ? 1 : 0);