function LocalCommandTranscoderTestCase::testShouldReturnOutputDimensionsWhenInputAndOutputAspectRatioEqual in Video 6.5
File
- tests/
transcoder_localcommand.test, line 26 - Definition of LocalCommandTranscoderTestCase.
Class
- LocalCommandTranscoderTestCase
- @file Definition of LocalCommandTranscoderTestCase.
Code
function testShouldReturnOutputDimensionsWhenInputAndOutputAspectRatioEqual() {
module_load_include('lib.inc', 'video');
module_load_include('inc', 'video', 'transcoders/video_localcommand');
$transcoder = new video_localcommand();
$video = new stdClass();
$video->dimensions = '160x90';
$fileinfo = array(
'width' => 1600,
'height' => 900,
);
$options = $transcoder
->getDimensionParameters($video, $fileinfo);
$this
->assertIdentical($options->width, 160, 'width');
$this
->assertIdentical($options->height, 90, 'height');
$this
->assertIdentical($options->paddingwidth, 160, 'paddingwidth');
$this
->assertIdentical($options->paddingheight, 90, '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');
}