diff --git a/tests/Integration/Database/QueryBuilderTest.php b/tests/Integration/Database/QueryBuilderTest.php index ab56a62a5010..ca344c5c24b7 100644 --- a/tests/Integration/Database/QueryBuilderTest.php +++ b/tests/Integration/Database/QueryBuilderTest.php @@ -456,15 +456,6 @@ public function testPluck(string $pluckFn): void 'Lorem Ipsum.' => 'Bar Post', ], DB::table('posts')->$pluckFn('title', 'content')->toArray()); - // Test custom query calculations. - $this->assertSame([ - 2 => 'FOO POST', - 4 => 'BAR POST', - ], DB::table('posts')->$pluckFn( - DB::raw('UPPER(title)'), - DB::raw('2 * id') - )->toArray()); - // Test null and empty string as key. $this->assertSame([ 'science' => 'Lorem Ipsum b.', @@ -497,4 +488,16 @@ public static function pluckProvider(): array ['pluckPDO'], ]; } + + public function testPluckPDORawExpressions(): void + { + // Test custom query calculations. + $this->assertSame([ + 2 => 'FOO POST', + 4 => 'BAR POST', + ], DB::table('posts')->pluckPDO( + DB::raw('UPPER(title)'), + DB::raw('2 * id') + )->toArray()); + } }