From 662651236e3f27a977cfb9d30d64c8938398dca7 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 22 Sep 2023 00:07:11 +0000 Subject: [PATCH] Fix tests --- Utils/StringUtils.php | 4 ++-- tests/Message/Http/HttpRequestTest.php | 2 +- tests/Security/Sample/noDeprecated.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Utils/StringUtils.php b/Utils/StringUtils.php index 6d1191ecd..31d23d291 100755 --- a/Utils/StringUtils.php +++ b/Utils/StringUtils.php @@ -422,7 +422,7 @@ final class StringUtils /** * Turn ints into spreadsheet column names * - * @param int $num Column number + * @param int $num Column number (1 = A) * * @return string * @@ -437,7 +437,7 @@ final class StringUtils $result = ''; while ($num >= 0) { $remainder = $num % 26; - $result = \chr(65 + $remainder) . $result; + $result = \chr(64 + $remainder) . $result; if ($num < 26) { break; diff --git a/tests/Message/Http/HttpRequestTest.php b/tests/Message/Http/HttpRequestTest.php index cf8bfef37..f62d2f485 100755 --- a/tests/Message/Http/HttpRequestTest.php +++ b/tests/Message/Http/HttpRequestTest.php @@ -270,7 +270,7 @@ final class HttpRequestTest extends \PHPUnit\Framework\TestCase 'b' => [4, 5], ]; - $request->setData('abc', \json_encode($data) . ','); + $request->setData('abc', \json_encode($data)); self::assertEquals($data, $request->getDataJson('abc')); } diff --git a/tests/Security/Sample/noDeprecated.php b/tests/Security/Sample/noDeprecated.php index 8cacd281e..8788c75c4 100755 --- a/tests/Security/Sample/noDeprecated.php +++ b/tests/Security/Sample/noDeprecated.php @@ -3,5 +3,5 @@ declare(strict_types=1); function noDeprecated() : string { - return \is_string(''); + return ''; }