/** * Get search fields from form xml. * * @return array Search fields. */ public function getSearchFields() { return array_merge(parent::getSearchFields(), $this->state->get('profileKeys')); }
/** * Method to test getSearchFields(). * * @return void * * @covers Windwalker\Model\ListModel::getSearchFields */ public function testGetSearchFields() { $config = array('prefix' => 'stub', 'name' => 'posts'); $listModel = new ListModel($config); $expected = array('post.title', 'post.category_title'); $this->assertEquals($expected, $listModel->getSearchFields()); }