1
0

MovieTest.php 957 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace Test\Preview;
  8. /**
  9. * Class MovieTest
  10. *
  11. * @group DB
  12. *
  13. * @package Test\Preview
  14. */
  15. class MovieTest extends Provider {
  16. protected function setUp(): void {
  17. $avconvBinary = \OC_Helper::findBinaryPath('avconv');
  18. $ffmpegBinary = ($avconvBinary) ? null : \OC_Helper::findBinaryPath('ffmpeg');
  19. if ($avconvBinary || $ffmpegBinary) {
  20. parent::setUp();
  21. \OC\Preview\Movie::$avconvBinary = $avconvBinary;
  22. \OC\Preview\Movie::$ffmpegBinary = $ffmpegBinary;
  23. $fileName = 'testimage.mp4';
  24. $this->imgPath = $this->prepareTestFile($fileName, \OC::$SERVERROOT . '/tests/data/' . $fileName);
  25. $this->width = 560;
  26. $this->height = 320;
  27. $this->provider = new \OC\Preview\Movie;
  28. } else {
  29. $this->markTestSkipped('No Movie provider present');
  30. }
  31. }
  32. }