Skip to content

Commit

Permalink
test: fix all adapter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n committed Feb 3, 2017
1 parent 5c79cdc commit 349a640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/adapter/ffmpeg_animated_gif_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function testSerializeUnserialize() {
$saveResult = $this->anim->addFrame($this->frame1);
$this->assertEquals(true, $saveResult, 'Save result should be true');
$this->assertEquals(true, file_exists(self::$outFilePath), 'File "'.self::$outFilePath.'" should exist after saving');
$this->assertEquals(30585, filesize(self::$outFilePath), 'Animation binary size should be int(30585)');
$this->assertEquals(30534, filesize(self::$outFilePath), 'Animation binary size should be int(30534)');
$imageInfo = getimagesize(self::$outFilePath);
$this->assertEquals(100, $imageInfo[0], 'Saved image width should be int(100)');
$this->assertEquals(120, $imageInfo[1], 'Saved image height should be int(120)');
Expand Down
6 changes: 3 additions & 3 deletions test/adapter/ffmpeg_movie_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function testGetDuration() {

public function testGetDuration_Audio() {
$this->assertInternalType('float', $this->audio->getDuration(), 'Duration is of float type');
$this->assertEquals(15.84, $this->audio->getDuration(), 'Duration should be float(15.88)');
$this->assertEquals(15.85, $this->audio->getDuration(), 'Duration should be float(15.85)');
}

public function testGetFrameCount() {
Expand Down Expand Up @@ -213,7 +213,7 @@ public function testGetVideoCodec() {

public function testGetAudioCodec() {
$this->assertInternalType('string', $this->movie->getAudioCodec(), 'Audio codec is of string type');
$this->assertEquals('aac (mp4a / 0x6134706D)', $this->movie->getAudioCodec(), 'Audio codec should be string(aac)');
$this->assertEquals('aac (LC) (mp4a / 0x6134706D)', $this->movie->getAudioCodec(), 'Audio codec should be string(aac)');
}

public function testGetAudioChannels() {
Expand Down Expand Up @@ -268,6 +268,6 @@ public function testSerializeUnserialize() {
$this->movie = null;
$this->movie = unserialize($serialized);
$this->assertInternalType('float', $this->movie->getDuration(), 'Duration is of float type');
$this->assertEquals(32.13, $this->movie->getDuration(), 'Duration should be float(32.13)');
$this->assertEquals(32.14, $this->movie->getDuration(), 'Duration should be float(32.14)');
}
}

0 comments on commit 349a640

Please sign in to comment.