Skip to content

Commit 5c79cdc

Browse files
committed
test(FFmpegMovieTest): fix tests
1 parent c6ddd34 commit 5c79cdc

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

test/FFmpegAnimatedGifTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function testGetAnimation() {
6666
$this->anim->addFrame($this->frame2);
6767

6868
$animData = $this->anim->getAnimation();
69-
$this->assertEquals(20936, strlen($animData), 'Animation binary size should be int(20936)');
69+
$this->assertEquals(20901, strlen($animData), 'Animation binary size should be int(20901)');
7070
}
7171

7272
public function testSave() {
@@ -76,7 +76,7 @@ public function testSave() {
7676
$saveResult = $this->anim->save();
7777
$this->assertEquals(true, $saveResult, 'Save result should be true');
7878
$this->assertEquals(true, file_exists(self::$outFilePath), 'File "'.self::$outFilePath.'" should exist after saving');
79-
$this->assertEquals(20936, filesize(self::$outFilePath), 'Animation binary size should be int(20936)');
79+
$this->assertEquals(20901, filesize(self::$outFilePath), 'Animation binary size should be int(20901)');
8080
$imageInfo = getimagesize(self::$outFilePath);
8181
$this->assertEquals(100, $imageInfo[0], 'Saved image width should be int(100)');
8282
$this->assertEquals(120, $imageInfo[1], 'Saved image height should be int(120)');
@@ -93,7 +93,7 @@ public function testSerializeUnserialize() {
9393
$saveResult = $this->anim->save();
9494
$this->assertEquals(true, $saveResult, 'Save result should be true');
9595
$this->assertEquals(true, file_exists(self::$outFilePath), 'File "'.self::$outFilePath.'" should exist after saving');
96-
$this->assertEquals(20936, filesize(self::$outFilePath), 'Animation binary size should be int(20936)');
96+
$this->assertEquals(20901, filesize(self::$outFilePath), 'Animation binary size should be int(20901)');
9797
$imageInfo = getimagesize(self::$outFilePath);
9898
$this->assertEquals(100, $imageInfo[0], 'Saved image width should be int(100)');
9999
$this->assertEquals(120, $imageInfo[1], 'Saved image height should be int(120)');

test/FFmpegMovieTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ public function testPersistentResourceSimulation() {
7979

8080
public function testGetDuration() {
8181
$this->assertInternalType('float', $this->movie->getDuration(), 'Duration is of float type');
82-
$this->assertEquals(32.13, $this->movie->getDuration(), 'Duration should be float(32.13)');
82+
$this->assertEquals(32.14, $this->movie->getDuration(), 'Duration should be float(32.14)');
8383
}
8484
public function testGetDuration_Audio() {
8585
$this->assertInternalType('float', $this->audio->getDuration(), 'Duration is of float type');
86-
$this->assertEquals(15.84, $this->audio->getDuration(), 'Duration should be float(15.84)');
86+
$this->assertEquals(15.85, $this->audio->getDuration(), 'Duration should be float(15.85)');
8787
}
8888

8989
public function testGetFrameCount() {
@@ -211,7 +211,7 @@ public function testGetVideoCodec() {
211211

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

217217
public function testGetAudioChannels() {
@@ -266,6 +266,6 @@ public function testSerializeUnserialize() {
266266
$this->movie = null;
267267
$this->movie = unserialize($serialized);
268268
$this->assertInternalType('float', $this->movie->getDuration(), 'Duration is of float type');
269-
$this->assertEquals(32.13, $this->movie->getDuration(), 'Duration should be float(32.13)');
269+
$this->assertEquals(32.14, $this->movie->getDuration(), 'Duration should be float(32.14)');
270270
}
271271
}

0 commit comments

Comments
 (0)