From da52724aac9d714dbcff15a60d90d38a63f9e38e Mon Sep 17 00:00:00 2001 From: Petr Knap <8299754+petrknap@users.noreply.github.com> Date: Sat, 2 Nov 2024 18:50:39 +0100 Subject: [PATCH] wip --- tests/Coder/CoderTestCase.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/Coder/CoderTestCase.php b/tests/Coder/CoderTestCase.php index e1e4207..710152f 100644 --- a/tests/Coder/CoderTestCase.php +++ b/tests/Coder/CoderTestCase.php @@ -5,19 +5,25 @@ namespace PetrKnap\Binary\Coder; use LogicException; +use PetrKnap\Binary\DecoderTest; +use PetrKnap\Binary\EncoderTest; use PetrKnap\Binary\TestCase; abstract class CoderTestCase extends TestCase { - public const DATA_BASE64 = '2jmj7l5rSw0yVb/vlWAYkK/YBwnaOaPuXmtLDTJVv++VYBiQr9gHCdo5o+5ea0sNMlW/75VgGJCv2AcJ'; - - abstract public static function data(): array; + protected const DATA_BASE64 = '2jmj7l5rSw0yVb/vlWAYkK/YBwnaOaPuXmtLDTJVv++VYBiQr9gHCdo5o+5ea0sNMlW/75VgGJCv2AcJ'; + /** + * @internal reused in {@see EncoderTest} and {@see DecoderTest} + */ public static function getDecodedData(): string { return base64_decode(self::DATA_BASE64); } + /** + * @internal reused in {@see EncoderTest} and {@see DecoderTest} + */ public static function getEncodedData(): string { foreach (static::data() as $data) { @@ -25,4 +31,6 @@ public static function getEncodedData(): string } throw new LogicException('Empty data set.'); } + + abstract public static function data(): array; }