Skip to content

Commit

Permalink
Update QueryBuilderTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bert-w committed Sep 15, 2023
1 parent 016f3e9 commit ee23301
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/Integration/Database/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,9 @@ public function testPluck()
2 => 'Bar Post',
], DB::table('posts')->pluck('title', 'id')->toArray());

$this->assertSame([
'2017-11-12 13:14:15' => 'Foo Post',
'2018-01-02 03:04:05' => 'Bar Post',
], DB::table('posts')->pluck('title', 'created_at')->toArray());
$results = DB::table('posts')->pluck('title', 'created_at');
$this->assertSame(['2017-11-12 13:14:15', '2018-01-02 03:04:05'], $results->keys()->map(fn ($v) => substr($v, 0, 19))->toArray());
$this->assertSame(['Foo Post', 'Bar Post'], $results->values()->toArray());

$this->assertSame([
'Lorem Ipsum.' => 'Bar Post',
Expand Down

0 comments on commit ee23301

Please sign in to comment.