/**
  * Test that empty expressions don't emit invalid SQL.
  *
  * @return void
  */
 public function testSqlWhenEmpty()
 {
     $expr = new QueryExpression();
     $binder = new ValueBinder();
     $result = $expr->sql($binder);
     $this->assertEquals('', $result);
 }
 /**
  * Tests that the query expression uses the type map when the
  * specific comparison functions are used.
  *
  * @dataProvider methodsProvider
  * @return void
  */
 public function testTypeMapUsage($method)
 {
     $expr = new QueryExpression([], ['created' => 'date']);
     $expr->{$method}('created', 'foo');
     $binder = new ValueBinder();
     $expr->sql($binder);
     $bindings = $binder->bindings();
     $type = current($bindings)['type'];
     $this->assertEquals('date', $type);
 }