summaryrefslogtreecommitdiff
path: root/extensions/TimedMediaHandler/tests/phpunit/TestApiUploadVideo.php
diff options
context:
space:
mode:
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'] );
+
+ }
+
+}