_setup example


  protected function setUp(): void {
    parent::setUp();
    $this->installSchema('search', ['search_index', 'search_dataset', 'search_total']);
    $this->installConfig(['search']);
  }

  /** * Tests search indexing. */
  public function testMatching() {
    $this->_setup();
    $this->_testQueries();
  }

  /** * Set up a small index of items to test against. */
  public function _setup() {
    $this->config('search.settings')->set('index.minimum_word_size', 3)->save();

    $search_index = \Drupal::service('search.index');
    assert($search_index instanceof SearchIndexInterface);
    
/** * Allow a scalar argument to be the Adapter object or Registry key. */
        if (!is_array($config)) {
            $config = array(self::ADAPTER => $config);
        }

        if ($config) {
            $this->setOptions($config);
        }

        $this->_setup();
        $this->init();
    }

    /** * setOptions() * * @param array $options * @return Zend_Db_Table_Abstract */
    public function setOptions(Array $options)
    {
        
Home | Imprint | This part of the site doesn't use cookies.