SearchApiSolrExtractionTest.php in Search API Solr 8.3
File
tests/src/Kernel/SearchApiSolrExtractionTest.php
View source
<?php
namespace Drupal\Tests\search_api_solr\Kernel;
use Drupal\search_api\Entity\Server;
class SearchApiSolrExtractionTest extends SolrBackendTestBase {
public function testBackend() {
$filepath = drupal_get_path('module', 'search_api_solr_test') . '/assets/test_extraction.pdf';
$backend = Server::load($this->serverId)
->getBackend();
$content = $backend
->extractContentFromFile($filepath);
$this
->assertStringContainsString('The extraction seems working!', $content);
}
}