function get_data_object(array $instance, array $query_terms) { $plugin = $this->mockFactory->getUTCWMock(); $db = $this->mockFactory->getWPDBMock(); $db->expects($this->testCase->any())->method('get_results')->will($this->testCase->returnValue($query_terms)); $plugin->set('wpdb', $db); $plugin->set('dataConfig', $this->get_data_config($instance, $plugin)); return new UTCW_Data($plugin); }