Skip to content

Commit 5aa356f

Browse files
committed
refactor: refactored tests
1 parent 7f0dd93 commit 5aa356f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/Coder/CoderTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99

1010
abstract class CoderTestCase extends TestCase
1111
{
12-
protected const DATA_BASE64 = '2jmj7l5rSw0yVb/vlWAYkK/YBwnaOaPuXmtLDTJVv++VYBiQr9gHCdo5o+5ea0sNMlW/75VgGJCv2AcJ';
12+
public const DATA_BASE64 = '2jmj7l5rSw0yVb/vlWAYkK/YBwnaOaPuXmtLDTJVv++VYBiQr9gHCdo5o+5ea0sNMlW/75VgGJCv2AcJ';
1313

1414
abstract public static function data(): array;
1515

16-
protected static function getDecodedData(): string
16+
public static function getDecodedData(): string
1717
{
1818
return base64_decode(self::DATA_BASE64);
1919
}
2020

21-
protected static function getEncodedData(): string
21+
public static function getEncodedData(): string
2222
{
2323
foreach (static::data() as $data) {
2424
return $data[1];

tests/Coder/ZlibTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testEncodeThrows(int|null $encoding, int|null $level): void
3636
{
3737
self::expectException(Exception\CoderCouldNotEncodeData::class);
3838

39-
(new zlib())->encode(
39+
(new Zlib())->encode(
4040
self::getDecodedData(),
4141
encoding: $encoding,
4242
level: $level,

tests/Serializer/SerializerTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function testSerializesSerializable(): void
1313
{
1414
self::assertEquals(
1515
static::getSerialized(),
16-
static::getSerializer()->serialize(static::getSerializable()),
16+
static::getSerializer()->serialize(self::getSerializable()),
1717
);
1818
}
1919

@@ -28,7 +28,7 @@ public function testSerializeThrowsOnNonserializable(): void
2828
public function testUnserializesSerialized(): void
2929
{
3030
self::assertEquals(
31-
static::getSerializable(),
31+
self::getSerializable(),
3232
static::getSerializer()->unserialize(static::getSerialized()),
3333
);
3434
}

0 commit comments

Comments
 (0)