Example #1
0
 /**
  * Tests whether a select query with order by is build correctly.
  *
  * @test
  */
 public function testOrderBy()
 {
     $table = new Table('`Customer`');
     // Table name must be always quoted
     $tableConfig = new TableConfiguration('Customer');
     $tableConfig->setOrderBy('id DESC');
     $query = $this->createSelectQueryBuilder($tableConfig, $table)->getSQL();
     $this->assertEquals('SELECT * FROM `Customer` t ORDER BY id DESC', $query);
 }