Пример #1
0
 /**
  * @covers ::table
  * @covers ::getTable
  * @covers ::setTable
  * @covers ::clearTable
  */
 public function testTable()
 {
     $query = new Query\Update(self::getDb());
     $query->table('table1')->table('table2', 'alias2');
     $expected = array(new SQL\Aliased('table1'), new SQL\Aliased('table2', 'alias2'));
     $this->assertEquals($expected, $query->getTable());
     $query->clearTable();
     $this->assertEmpty($query->getTable());
     $query->setTable($expected);
     $this->assertEquals($expected, $query->getTable());
 }
Пример #2
0
 /**
  * @param  Query\Update $query
  * @return array
  */
 public static function parameters(Query\Update $query)
 {
     return Compiler::parameters(array($query->getTable(), $query->getJoin(), $query->getSet(), $query->getWhere(), $query->getOrder(), $query->getLimit()));
 }