protected function SearchApiWebTest::clearIndex in Search API 7
Tests whether clearing the index works correctly.
1 call to SearchApiWebTest::clearIndex()
- SearchApiWebTest::testFramework in ./
search_api.test - Tests correct admin UI, indexing and search behavior.
File
- ./
search_api.test, line 693 - Contains the SearchApiWebTest and the SearchApiUnitTest classes.
Class
- SearchApiWebTest
- Class for testing Search API functionality via the UI.
Code
protected function clearIndex() {
$this
->drupalPost("admin/config/search/search_api/index/{$this->index_id}", array(), t('Clear all indexed data'));
$this
->drupalPost(NULL, array(), t('Confirm'));
$this
->assertText(t('The index was successfully cleared.'));
$this
->assertText(t('@indexed/@total indexed', array(
'@indexed' => 0,
'@total' => 14,
)), 'Correct index status displayed.');
}