Exemplo n.º 1
0
 public function testMysqlMakeDeleteQuery()
 {
     $driver = new \T4\Dbal\Drivers\Mysql();
     $query = new \T4\Dbal\Query();
     $query = $query->delete('test1, test2')->where('foo=:foo');
     $this->assertEquals("DELETE FROM `test1`, `test2`\nWHERE foo=:foo", $driver->makeQueryString($query));
     $query = new \T4\Dbal\Query();
     $query = $query->delete()->from('test1, test2')->where('foo=:foo');
     $this->assertEquals("DELETE FROM `test1`, `test2`\nWHERE foo=:foo", $driver->makeQueryString($query));
 }
Exemplo n.º 2
0
 public function testMysqlMakeStringQuery()
 {
     $driver = new \T4\Dbal\Drivers\Mysql();
     $query = new \T4\Dbal\Query('SELECT * FROM "foo" WHERE "bar"=42');
     $this->assertEquals('SELECT * FROM "foo" WHERE "bar"=42', $query->string);
     $this->assertEquals('SELECT * FROM "foo" WHERE "bar"=42', $driver->makeQueryString($query));
 }