From d9e538265966820f26d8a262c8aba82e5ca5ff89 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 24 Aug 2020 13:28:17 +0200 Subject: [PATCH] Add a few legacy stickers --- src/type.php | 2 +- tests/IntegrationTest.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/type.php b/src/type.php index 573fec2..21ac83f 100644 --- a/src/type.php +++ b/src/type.php @@ -518,7 +518,7 @@ function internalDecode(string $fileId): array $l = \fstat($fileId)['size'] - \ftell($fileId); $l -= $result['version'] >= 4 ? 2 : 1; if ($l > 0) { - \trigger_error("Unique file ID $orig has $l bytes of leftover data"); + \trigger_error("File ID $orig has $l bytes of leftover data"); } return $result; } diff --git a/tests/IntegrationTest.php b/tests/IntegrationTest.php index 04089bd..0599405 100644 --- a/tests/IntegrationTest.php +++ b/tests/IntegrationTest.php @@ -34,6 +34,14 @@ class IntegrationTest extends TestCase public function provideFileIdsAndType(): \Generator { + foreach (['CAADBAADwwADmFmqDf6xBrPTReqHFgQ', 'CAACAgQAAxkBAAIC4l9CWDGzVUcDejU0TETLWbOdfsCoAALDAAOYWaoN_rEGs9NF6ocbBA', 'CAADBAADwwADmFmqDf6xBrPTReqHAg'] as $fileId) { + yield [ + 'sticker', + $fileId, + 'AgADwwADmFmqDQ' + ]; + } + $dest = \getenv('DEST'); $token = \getenv('TOKEN'); foreach ($this->provideChats() as $chat) { @@ -85,7 +93,6 @@ class IntegrationTest extends TestCase } } } - return $result; } public function provideChats(): array {