X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=tests%2Fphpunit%2Fmocks%2Fmedia%2FMockOggHandler.php;h=bb686fd84685ef7aafb6143575aa2816cc203cfe;hb=700e49ddddcb9b791f5edbb5dd569b18c3a7f2eb;hp=b110e2137f15c71750ab35e89878943fb69833c9;hpb=d716155c8b2d6e4a51a4110195cee7a1794846e8;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/mocks/media/MockOggHandler.php b/tests/phpunit/mocks/media/MockOggHandler.php index b110e2137f..bb686fd846 100644 --- a/tests/phpunit/mocks/media/MockOggHandler.php +++ b/tests/phpunit/mocks/media/MockOggHandler.php @@ -51,7 +51,7 @@ class MockOggHandler extends OggHandlerTMH { 'length' => $this->getLength( $file ), 'offset' => $this->getOffset( $file ), 'width' => $targetWidth, - 'height' => $targetHeight, + 'height' => $targetHeight, 'isVideo' => !$this->isAudio( $file ), 'thumbtime' => isset( $params['thumbtime'] @@ -59,7 +59,7 @@ class MockOggHandler extends OggHandlerTMH { 'start' => isset( $params['start'] ) ? $params['start'] : false, 'end' => isset( $params['end'] ) ? $params['end'] : false, 'fillwindow' => isset( $params['fillwindow'] ) ? $params['fillwindow'] : false, - 'disablecontrols' => isset ( $params['disablecontrols'] ) ? $params['disablecontrols'] : false + 'disablecontrols' => isset( $params['disablecontrols'] ) ? $params['disablecontrols'] : false ]; // No thumbs for audio @@ -76,18 +76,30 @@ class MockOggHandler extends OggHandlerTMH { } function getLength( $file ) { + if ( $this->isAudio( $file ) ) { + return 0.99875; + } return 4.3666666666667; } function getBitRate( $file ) { + if ( $this->isAudio( $file ) ) { + return 41107; + } return 590013; } function getWebType( $file ) { + if ( $this->isAudio( $file ) ) { + return "audio/ogg; codecs=\"vorbis\""; + } return "video/ogg; codecs=\"theora\""; } function getFramerate( $file ) { + if ( $this->isAudio( $file ) ) { + return 0; + } return 30; } }