/** * Test for SELECT clause. * * @return void * * @since 1.0 */ public function testSelect() { $q = new PostgresqlQuery($this->dbo); $this->assertThat($q->select('foo'), $this->identicalTo($q), 'Tests chaining.'); $this->assertThat($q->type, $this->equalTo('select'), 'Tests the type property is set correctly.'); $this->assertThat(trim($q->select), $this->equalTo('SELECT foo'), 'Tests the select element is set correctly.'); $q->select('bar'); $this->assertThat(trim($q->select), $this->equalTo('SELECT foo,bar'), 'Tests the second use appends correctly.'); $q->select(array('goo', 'car')); $this->assertThat(trim($q->select), $this->equalTo('SELECT foo,bar,goo,car'), 'Tests the second use appends correctly.'); }