mirror of
https://github.com/silverstripe/silverstripe-textextraction
synced 2024-10-22 11:06:00 +02:00
MINOR: module support for Silverstripe 3.7
This commit is contained in:
parent
944cabb805
commit
6fe7172663
10
.travis.yml
10
.travis.yml
@ -10,16 +10,14 @@ addons:
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.4
|
||||
env: DB=PGSQL CORE_RELEASE=3.2
|
||||
- php: 5.5
|
||||
env: DB=PGSQL CORE_RELEASE=3.3
|
||||
env: DB=PGSQL CORE_RELEASE=3.7
|
||||
- php: 5.6
|
||||
env: DB=PGSQL CORE_RELEASE=3.4
|
||||
env: DB=PGSQL CORE_RELEASE=3.7
|
||||
- php: 5.6
|
||||
env: DB=MYSQL CORE_RELEASE=3.5
|
||||
env: DB=MYSQL CORE_RELEASE=3.7
|
||||
- php: 7.0
|
||||
env: DB=MYSQL CORE_RELEASE=3.6
|
||||
env: DB=MYSQL CORE_RELEASE=3.7
|
||||
- php: 7.1
|
||||
env: DB=MYSQL CORE_RELEASE=3
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @author mstephens
|
||||
*
|
||||
*/
|
||||
abstract class FileTextExtractor extends Object
|
||||
abstract class FileTextExtractor extends SS_Object
|
||||
{
|
||||
/**
|
||||
* Set priority from 0-100.
|
||||
|
@ -18,7 +18,7 @@
|
||||
"require": {
|
||||
"php": ">=5.3.2",
|
||||
"composer/installers": "*",
|
||||
"silverstripe/framework": "^3.1",
|
||||
"silverstripe/framework": "^3.7",
|
||||
"guzzle/guzzle": "^3.9",
|
||||
"symfony/event-dispatcher": "^2.6.0@stable",
|
||||
"symfony/http-foundation": "^2.6.0"
|
||||
|
@ -28,13 +28,14 @@ class FileTextExtractableTest extends SapphireTest
|
||||
copy(BASE_PATH.'/textextraction/tests/fixtures/test1.html', BASE_PATH.'/textextraction/tests/fixtures/test1-copy.html');
|
||||
|
||||
// Use HTML, since the extractor is always available
|
||||
/** @var File&FileTextExtractable $file */
|
||||
$file = new File(array(
|
||||
'Name' => 'test1-copy.html',
|
||||
'Filename' => 'textextraction/tests/fixtures/test1-copy.html'
|
||||
));
|
||||
$file->write();
|
||||
|
||||
$content = $file->extractFileAsText();
|
||||
$content = (string) $file->extractFileAsText();
|
||||
$this->assertContains('Test Headline', $content);
|
||||
$this->assertContains('Test Text', $content);
|
||||
$this->assertEquals($content, $file->FileContentCache);
|
||||
|
Loading…
Reference in New Issue
Block a user