You are here

public function TravisLogEventListener::startTest in Search API Solr 8

Same name and namespace in other branches
  1. 8.3 tests/src/TravisLogEventListener.php \Drupal\Tests\search_api_solr\TravisLogEventListener::startTest()

File

tests/src/TravisLogEventListener.php, line 44

Class

TravisLogEventListener

Namespace

Drupal\Tests\search_api_solr

Code

public function startTest(Test $test) {

  // In case of a runtime error in the previous test, keep the log.
  if (file_exists(TRAVIS_BUILD_DIR . '/solr.query.log')) {
    file_put_contents(TRAVIS_BUILD_DIR . '/solr.error.log', file_get_contents(TRAVIS_BUILD_DIR . '/solr.query.log'), FILE_APPEND | LOCK_EX);
  }
  $this->errors = FALSE;
}