Skip to content

Commit

Permalink
Re-enable query builder tests (#35894)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Jan 14, 2021
1 parent 29c831d commit 212d7f4
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/Database/DatabaseQueryBuilderTest.php
Expand Up @@ -305,20 +305,20 @@ public function testWheresWithArrayValue()
$this->assertSame('select * from "users" where "id" = ?', $builder->toSql());
$this->assertEquals([0 => 12], $builder->getBindings());

// $builder = $this->getBuilder();
// $builder->select('*')->from('users')->where('id', '=', [12, 30]);
// $this->assertSame('select * from "users" where "id" = ?', $builder->toSql());
// $this->assertEquals([0 => 12, 1 => 30], $builder->getBindings());

// $builder = $this->getBuilder();
// $builder->select('*')->from('users')->where('id', '!=', [12, 30]);
// $this->assertSame('select * from "users" where "id" != ?', $builder->toSql());
// $this->assertEquals([0 => 12, 1 => 30], $builder->getBindings());

// $builder = $this->getBuilder();
// $builder->select('*')->from('users')->where('id', '<>', [12, 30]);
// $this->assertSame('select * from "users" where "id" <> ?', $builder->toSql());
// $this->assertEquals([0 => 12, 1 => 30], $builder->getBindings());
$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('id', '=', [12, 30]);
$this->assertSame('select * from "users" where "id" = ?', $builder->toSql());
$this->assertEquals([0 => 12], $builder->getBindings());

$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('id', '!=', [12, 30]);
$this->assertSame('select * from "users" where "id" != ?', $builder->toSql());
$this->assertEquals([0 => 12], $builder->getBindings());

$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('id', '<>', [12, 30]);
$this->assertSame('select * from "users" where "id" <> ?', $builder->toSql());
$this->assertEquals([0 => 12], $builder->getBindings());
}

public function testMySqlWrappingProtectsQuotationMarks()
Expand Down

0 comments on commit 212d7f4

Please sign in to comment.