FIX Ensure test uses database cache, it asserts assuming it is configured

This commit is contained in:
Robbie Averill 2019-08-28 10:07:21 +12:00
parent 943f393ee8
commit 32e2f9f84f

View File

@ -5,6 +5,7 @@ namespace SilverStripe\TextExtraction\Tests;
use SilverStripe\Assets\File;
use SilverStripe\Core\Config\Config;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\TextExtraction\Cache\FileTextCache;
use SilverStripe\TextExtraction\Extension\FileTextExtractable;
class FileTextExtractableTest extends SapphireTest
@ -44,8 +45,9 @@ class FileTextExtractableTest extends SapphireTest
public function testExtractFileAsText()
{
// Use HTML, since the extractor is always available
/** @var File|FileTextExtractable $file */
/** @var File&FileTextExtractable $file */
$file = new File(['Name' => 'test1-copy.html']);
$file->setTextCache(new FileTextCache\Database());
$file->setFromLocalFile(dirname(__FILE__) . '/fixtures/test1-copy.html');
$file->write();