Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Aug 22, 2024
1 parent 738bc11 commit 500f3eb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/Database/DatabaseQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1328,8 +1328,8 @@ public function testWhereAll()

$builder = $this->getBuilder();
$builder->select('*')->from('users')->whereAll([
fn(Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn(Builder $query) => $query->where('email', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('email', 'like', '%Otwell%'),
]);
$this->assertSame('select * from "users" where (("last_name" like ?) and ("email" like ?))', $builder->toSql());
$this->assertEquals(['%Otwell%', '%Otwell%'], $builder->getBindings());
Expand All @@ -1354,8 +1354,8 @@ public function testOrWhereAll()

$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('first_name', 'like', '%Taylor%')->orWhereAll([
fn(Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn(Builder $query) => $query->where('email', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('email', 'like', '%Otwell%'),
]);
$this->assertSame('select * from "users" where "first_name" like ? or (("last_name" like ?) and ("email" like ?))', $builder->toSql());
$this->assertEquals(['%Taylor%', '%Otwell%', '%Otwell%'], $builder->getBindings());
Expand All @@ -1375,8 +1375,8 @@ public function testWhereAny()

$builder = $this->getBuilder();
$builder->select('*')->from('users')->whereAny([
fn(Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn(Builder $query) => $query->where('email', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('email', 'like', '%Otwell%'),
]);
$this->assertSame('select * from "users" where (("last_name" like ?) or ("email" like ?))', $builder->toSql());
$this->assertEquals(['%Otwell%', '%Otwell%'], $builder->getBindings());
Expand All @@ -1401,8 +1401,8 @@ public function testOrWhereAny()

$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('first_name', 'like', '%Taylor%')->orWhereAny([
fn(Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn(Builder $query) => $query->where('email', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('email', 'like', '%Otwell%'),
]);
$this->assertSame('select * from "users" where "first_name" like ? or (("last_name" like ?) or ("email" like ?))', $builder->toSql());
$this->assertEquals(['%Taylor%', '%Otwell%', '%Otwell%'], $builder->getBindings());
Expand All @@ -1427,8 +1427,8 @@ public function testWhereNone()

$builder = $this->getBuilder();
$builder->select('*')->from('users')->whereNone([
fn(Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn(Builder $query) => $query->where('email', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('email', 'like', '%Otwell%'),
]);
$this->assertSame('select * from "users" where not (("last_name" like ?) or ("email" like ?))', $builder->toSql());
$this->assertEquals(['%Otwell%', '%Otwell%'], $builder->getBindings());
Expand All @@ -1453,8 +1453,8 @@ public function testOrWhereNone()

$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('first_name', 'like', '%Taylor%')->orWhereNone([
fn(Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn(Builder $query) => $query->where('email', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('last_name', 'like', '%Otwell%'),
fn (Builder $query) => $query->where('email', 'like', '%Otwell%'),
]);
$this->assertSame('select * from "users" where "first_name" like ? or not (("last_name" like ?) or ("email" like ?))', $builder->toSql());
$this->assertEquals(['%Taylor%', '%Otwell%', '%Otwell%'], $builder->getBindings());
Expand Down

0 comments on commit 500f3eb

Please sign in to comment.