Skip to content

Commit 0f8817f

Browse files
committed
test: fix SQL assertion PHPStan fallout
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent fb8b56b commit 0f8817f

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

‎system/Test/CIUnitTestCase.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,10 @@ public function assertHeaderNotEmitted(string $header, bool $ignoreCase = false)
448448
);
449449
}
450450

451-
public function assertSqlEquals(string $expected, string $actual, string $message = ''): void
451+
public function assertSqlEquals(string $expected, mixed $actual, string $message = ''): void
452452
{
453+
$this->assertIsString($actual, $message);
454+
453455
$this->assertSame(
454456
$expected,
455457
str_replace("\n", ' ', $actual),

‎utils/phpstan-baseline/argument.type.neon‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ parameters:
4242
count: 1
4343
path: ../../tests/system/Database/Builder/FromTest.php
4444

45-
-
46-
message: '#^Parameter \#3 \$subject of function str_replace expects array\<string\>\|string, CodeIgniter\\Database\\ResultInterface given\.$#'
47-
count: 10
48-
path: ../../tests/system/Database/Builder/GetTest.php
49-
50-
-
51-
message: '#^Parameter \#3 \$subject of function str_replace expects array\<string\>\|string, CodeIgniter\\Database\\ResultInterface\|false given\.$#'
52-
count: 6
53-
path: ../../tests/system/Database/Builder/GetTest.php
54-
5545
-
5646
message: '#^Parameter \#1 \$fields of method CodeIgniter\\Database\\Forge\:\:addField\(\) expects array\<string, array\|string\>\|string, array\<int, string\> given\.$#'
5747
count: 2

0 commit comments

Comments
 (0)