/** * Test for year extraction from date. * * @return void * * @since 12.1 */ public function test__toStringYear() { $q = new JDatabaseQueryInspector($this->dbo); $q->select($q->year($q->quoteName('col')))->from('table'); $this->assertThat((string) $q, $this->equalTo(PHP_EOL . "SELECT YEAR(`col`)" . PHP_EOL . "FROM table")); }