Exemplo n.º 1
0
 /**
  * Test for the PostgresqlQuery::__string method for a 'update' case.
  *
  * @return  void
  *
  * @since   1.0
  */
 public function test__toStringUpdate()
 {
     $q = new PostgresqlQuery($this->dbo);
     $q->update('#__foo AS a')->join('INNER', 'b ON b.id = a.id')->set('a.id = 2')->where('b.id = 1');
     $this->assertThat((string) $q, $this->equalTo(PHP_EOL . "UPDATE #__foo AS a" . PHP_EOL . "SET a.id = 2" . PHP_EOL . "FROM b" . PHP_EOL . "WHERE b.id = 1 AND b.id = a.id"), 'Tests for correct rendering.');
 }