summaryrefslogtreecommitdiff
path: root/extensions/TimedMediaHandler/tests/phpunit/TestApiUploadVideo.php
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-07-15 12:01:49 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-07-15 12:01:49 -0300
commit90060b2cf06033ede8f6d3c2f5acf4d180174905 (patch)
tree4664208d55a7b3048053acb1ac064d325f25ef91 /extensions/TimedMediaHandler/tests/phpunit/TestApiUploadVideo.php
parent7a31146918cdceef14689bf05d8f1602ec05bfcb (diff)
Add TimedMediaHandler extension that allows display audio and video files in wiki pages, using the same syntax as for image files
Diffstat (limited to 'extensions/TimedMediaHandler/tests/phpunit/TestApiUploadVideo.php')
-rw-r--r--extensions/TimedMediaHandler/tests/phpunit/TestApiUploadVideo.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/extensions/TimedMediaHandler/tests/phpunit/TestApiUploadVideo.php b/extensions/TimedMediaHandler/tests/phpunit/TestApiUploadVideo.php
new file mode 100644
index 00000000..ebc38ddf
--- /dev/null
+++ b/extensions/TimedMediaHandler/tests/phpunit/TestApiUploadVideo.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * TestApiUploadVideo test case.
+ *
+ * NOTE: This build heavily on ApiUploadTest ( would need to refactor ApiUploadTest for this to work better )
+ *
+ * @ingroup timedmedia
+ * @since 0.2
+ * @author Michael Dale
+ */
+
+/**
+ * @group Database
+ * @group Destructive
+ * @group medium
+ */
+class TestApiUploadVideo extends ApiTestCaseVideoUpload {
+
+ /**
+ * @dataProvider mediaFilesProvider
+ */
+ public function testUploadVideoFiles( $file ){
+
+ $result = $this->uploadFile( $file );
+
+ // Run asserts
+ $this->assertTrue( isset( $result['upload'] ) );
+ $this->assertEquals( 'Success', $result['upload']['result'] );
+ $this->assertEquals( filesize( $file['filePath'] ), ( int )$result['upload']['imageinfo']['size'] );
+ $this->assertEquals( $file['mime'], $result['upload']['imageinfo']['mime'] );
+
+ }
+
+}