Skip to main content

Search API

DrevOps\BehatSteps\Steps\Drupal\SearchApiTrait - Source, Example, Helpers

Run Drupal Search API indexing and cron hooks.

  • Add content to an index.
  • Run indexing for a specific number of items.
  • Run the Search API and Search API Solr cron hooks.

Prerequisites​

PrerequisiteCapability
A backend in the scenario's list provides "SearchIndexCapabilityInterface"SearchIndexCapabilityInterface
The "search_api" module from the "drupal/search_api" package is enabledModuleCapabilityInterface

Steps​

@When the :content_type content with the title :title is indexed

Index a node of a specific content type with a specific title

When the "article" content with the title "Test Article" is indexed
@When search indexing runs for :count item(s)

Run indexing for a specific number of items

When search indexing runs for 5 items
When search indexing runs for 1 item
@When the Search API cron runs

Run the Search API module cron hook

When the Search API cron runs
@When the Search API Solr cron runs

Run the Search API Solr module cron hook

When the Search API Solr cron runs