function LocalCommandTranscoderTestCase::testShouldReturnWidthAndHeightDivisibleByTwo in Video 6.5
File
- tests/
transcoder_localcommand.test, line 101 - Definition of LocalCommandTranscoderTestCase.
Class
- LocalCommandTranscoderTestCase
- @file Definition of LocalCommandTranscoderTestCase.
Code
function testShouldReturnWidthAndHeightDivisibleByTwo() {
module_load_include('lib.inc', 'video');
module_load_include('inc', 'video', 'transcoders/video_localcommand');
$transcoder = new video_localcommand();
$video = new stdClass();
$video->dimensions = '360x202';
$fileinfo = array(
'width' => 1280,
'height' => 720,
);
$options = $transcoder
->getDimensionParameters($video, $fileinfo);
$this
->assertIdentical($options->width, 360, 'width');
$this
->assertIdentical($options->height, 202, 'height');
$this
->assertIdentical($options->paddingwidth, 360, 'paddingwidth');
$this
->assertIdentical($options->paddingheight, 202, 'paddingheight');
$this
->assertIdentical($options->paddingtop, 0, 'paddingtop');
$this
->assertIdentical($options->paddingbottom, 0, 'paddingbottom');
$this
->assertIdentical($options->paddingleft, 0, 'paddingleft');
$this
->assertIdentical($options->paddingright, 0, 'paddingright');
}