/** * {@inheritdoc} */ public function setUp() { parent::setUp(); $this->installSchema('search_api', array('search_api_item', 'search_api_task')); // Create a test server. $this->server = Server::create(array( 'name' => $this->randomString(), 'id' => $this->randomMachineName(), 'status' => 1, 'backend' => 'search_api_test_backend', )); $this->server->save(); // Create a test index. $this->index = Index::create(array( 'name' => $this->randomString(), 'id' => $this->randomMachineName(), 'status' => 1, 'datasources' => array('entity:' . $this->testEntityTypeId), 'tracker' => 'default', 'server' => $this->server->id(), 'options' => array('index_directly' => FALSE), )); $this->index->save(); Utility::getIndexTaskManager()->addItemsAll($this->index); }
function setUp() { parent::setUp(); $this->installSchema('system', 'url_alias'); }