コード例 #1
0
ファイル: QueryTest.php プロジェクト: jbanety/database
 /**
  * Tests the \Joomla\Database\DatabaseQuery::columns method.
  *
  * @return  void
  *
  * @covers  \Joomla\Database\DatabaseQuery::columns
  * @since   1.0
  */
 public function testColumns()
 {
     $this->assertThat($this->instance->columns('foo'), $this->identicalTo($this->instance), 'Tests chaining.');
     $this->assertThat(trim(TestHelper::getValue($this->instance, 'columns')), $this->equalTo('(foo)'), 'Tests rendered value.');
     // Add another column.
     $this->instance->columns('bar');
     $this->assertThat(trim(TestHelper::getValue($this->instance, 'columns')), $this->equalTo('(foo,bar)'), 'Tests rendered value after second use.');
 }