class SearchApiSolrExtractionTest in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 tests/src/Kernel/SearchApiSolrExtractionTest.php \Drupal\Tests\search_api_solr\Kernel\SearchApiSolrExtractionTest
- 8.2 tests/src/Kernel/SearchApiSolrExtractionTest.php \Drupal\Tests\search_api_solr\Kernel\SearchApiSolrExtractionTest
Test tika extension based PDF extraction.
@group search_api_solr
Hierarchy
- class \Drupal\Tests\search_api_solr\Kernel\SolrBackendTestBase extends \Drupal\Tests\search_api\Kernel\BackendTestBase uses SolrCommitTrait
- class \Drupal\Tests\search_api_solr\Kernel\SearchApiSolrExtractionTest
Expanded class hierarchy of SearchApiSolrExtractionTest
1 file declares its use of SearchApiSolrExtractionTest
- SolrLegacyExtractionTest.php in modules/
search_api_solr_legacy/ tests/ src/ Kernel/ SolrLegacyExtractionTest.php
File
- tests/
src/ Kernel/ SearchApiSolrExtractionTest.php, line 12
Namespace
Drupal\Tests\search_api_solr\KernelView source
class SearchApiSolrExtractionTest extends SolrBackendTestBase {
/**
* Test tika extension based PDF extraction.
*/
public function testBackend() {
$filepath = drupal_get_path('module', 'search_api_solr_test') . '/assets/test_extraction.pdf';
/** @var \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend $backend */
$backend = Server::load($this->serverId)
->getBackend();
$content = $backend
->extractContentFromFile($filepath);
$this
->assertStringContainsString('The extraction seems working!', $content);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SearchApiSolrExtractionTest:: |
public | function | Test tika extension based PDF extraction. | |
SolrBackendTestBase:: |
protected | property | A Search API index ID. | 1 |
SolrBackendTestBase:: |
protected | property | The in-memory logger. | |
SolrBackendTestBase:: |
public static | property | Modules to enable for this test. | 3 |
SolrBackendTestBase:: |
protected | property | A Search API server ID. | 1 |
SolrBackendTestBase:: |
protected | function | Tests the last logged level and message. | |
SolrBackendTestBase:: |
protected | function | ||
SolrBackendTestBase:: |
protected | function | 1 | |
SolrBackendTestBase:: |
protected | function | ||
SolrBackendTestBase:: |
protected | function | ||
SolrBackendTestBase:: |
protected | function | ||
SolrBackendTestBase:: |
protected | function | Required parts of the setUp() function that are the same for all backends. | 2 |
SolrBackendTestBase:: |
protected | function | Executes a query and skips search_api post processing of results. | |
SolrBackendTestBase:: |
protected | function | Gets the Solr version. | |
SolrBackendTestBase:: |
protected | function | ||
SolrBackendTestBase:: |
protected | function | Called by setUp() to install required configs. | 2 |
SolrBackendTestBase:: |
public | function | ||
SolrBackendTestBase:: |
public | function | Clear the index after every test. | |
SolrBackendTestBase:: |
protected | function | ||
SolrCommitTrait:: |
protected | function | Explicitly sends a commit command to a Solr server. |