/** * {@inheritdoc} */ public function setUp() { parent::setUp(); $this->setUpExampleStructure(); Utility::getIndexTaskManager()->addItemsAll(Index::load($this->indexId)); }
/** * {@inheritdoc} */ public function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); $this->indexId = 'test_index'; Index::create(array('name' => 'Test index', 'id' => $this->indexId, 'status' => 1, 'datasource_settings' => array('entity:node' => array('plugin_id' => 'entity:node', 'settings' => array()))))->save(); }
/** * {@inheritdoc} */ public function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); $this->overviewPageUrl = 'admin/config/search/search-api'; }
/** * {@inheritdoc} */ public function setUp() { parent::setUp(); $this->setUpExampleStructure(); \Drupal::getContainer()->get('search_api.index_task_manager')->addItemsAll(Index::load($this->indexId)); $this->insertExampleContent(); $this->indexItems($this->indexId); }
/** * {@inheritdoc} */ public function setUp() { parent::setUp(); // Do not use a batch for tracking the initial items after creating an // index when running the tests via the GUI. Otherwise, it seems Drupal's // Batch API gets confused and the test fails. \Drupal::state()->set('search_api_use_tracking_batch', FALSE); $this->drupalLogin($this->adminUser); $this->overviewPageUrl = 'admin/config/search/search-api'; }
/** * {@inheritdoc} */ public function setUp() { parent::setUp(); // Add a test server and index. $this->getTestServer(); $this->getTestIndex(); // Set up example structure and content and populate the test index with // that content. $this->setUpExampleStructure(); $this->insertExampleContent(); \Drupal::getContainer()->get('search_api.index_task_manager')->addItemsAll(Index::load($this->indexId)); $this->indexItems($this->indexId); }
/** * {@inheritdoc} */ public function setUp() { parent::setUp(); // Add extra languages. ConfigurableLanguage::createFromLangcode('nl')->save(); ConfigurableLanguage::createFromLangcode('xx-lolspeak')->save(); // Do not use a batch for tracking the initial items after creating an // index when running the tests via the GUI. Otherwise, it seems Drupal's // Batch API gets confused and the test fails. \Drupal::state()->set('search_api_use_tracking_batch', FALSE); // Create an index and server to work with. $this->getTestServer(); $this->getTestIndex(); // Log in, so we can test all the things. $this->drupalLogin($this->adminUser); }
/** * {@inheritdoc} */ public function setUp() { parent::setUp(); $this->indexStorage = \Drupal::entityTypeManager()->getStorage('search_api_index'); }