blob: ebc38ddfd009dcbe155cef39e9f79c2c7bc081a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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'] );
}
}
|