Skip to content

Commit

Permalink
Improve base32 package implementation by removing complex function usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Mar 25, 2024
1 parent 6cb4bf6 commit 61feb1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Base32/Base32Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ public static function invalidDecodingSequence(): iterable

yield 'the padding character is contained within the alphabet' => [
'sequence' => 'A',
'message' => 'The alphabet can not contain a reerved character.',
'message' => 'The alphabet can not contain a reserved character.',
'alphabet' => str_replace('A', '*', PHP_BASE32_ASCII),
'padding' => '*',
];

yield 'the padding character is contained within the alphabet is case insensitive' => [
'sequence' => 'A',
'message' => 'The alphabet can not contain a reerved character.',
'message' => 'The alphabet can not contain a reserved character.',
'alphabet' => str_replace('A', '*', PHP_BASE32_ASCII),
'padding' => 'a',
];
Expand Down Expand Up @@ -271,14 +271,14 @@ public static function invalidDecodingSequence(): iterable

yield 'the alphabet can not contain "\r"' => [
'sequence' => 'A',
'message' => 'The alphabet can not contain a reerved character.',
'message' => 'The alphabet can not contain a reserved character.',
'alphabet' => substr(PHP_BASE32_ASCII, 0, -1)."\r",
'padding' => '=',
];

yield 'the alphabet can not contain "\n"' => [
'sequence' => 'A',
'message' => 'The alphabet can not contain a reerved character.',
'message' => 'The alphabet can not contain a reserved character.',
'alphabet' => substr(PHP_BASE32_HEX, 0, -1)."\n",
'padding' => '=',
];
Expand Down

0 comments on commit 61feb1b

Please sign in to comment.