You are here

function DrupalSolrMatchTestCase::tearDown in Apache Solr Search 6

Same name and namespace in other branches
  1. 6.2 tests/solr_index_and_search.test \DrupalSolrMatchTestCase::tearDown()

Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.

Overrides DrupalWebTestCase::tearDown

File

tests/solr_index_and_search.test, line 199
Tests for the apachsolr module: index and search.

Class

DrupalSolrMatchTestCase
@file Tests for the apachsolr module: index and search.

Code

function tearDown() {
  try {
    $this->solr
      ->deleteByQuery('*:*');
    $this->solr
      ->optimize();
  } catch (Exception $e) {

    //I know this is wrong, but I don't feel like learning how to throw my own failure right now
    $this
      ->assertTrue(1, 0, $e
      ->getMessage());
  }
  parent::tearDown();
}