mirror of
https://github.com/silverstripe/silverstripe-textextraction
synced 2024-10-22 11:06:00 +02:00
DEP Use PHPUnit 11
This commit is contained in:
parent
e411cbcd32
commit
918c501b96
@ -28,7 +28,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"squizlabs/php_codesniffer": "^3",
|
||||
"phpunit/phpunit": "^9.6",
|
||||
"phpunit/phpunit": "^11.3",
|
||||
"silverstripe/standards": "^1",
|
||||
"phpstan/extension-installer": "^1.3"
|
||||
},
|
||||
|
@ -14,7 +14,7 @@ class FileTextCacheDatabaseTest extends SapphireTest
|
||||
Config::modify()->set(Database::class, 'max_content_length', 5);
|
||||
|
||||
$cache = new Database();
|
||||
$file = $this->getMockBuilder(File::class)->setMethods(['write'])->getMock();
|
||||
$file = $this->getMockBuilder(File::class)->onlyMethods(['write'])->getMock();
|
||||
$content = '0123456789';
|
||||
$cache->save($file, $content);
|
||||
|
||||
|
@ -7,6 +7,7 @@ use SilverStripe\Assets\File;
|
||||
use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\TextExtraction\Extractor\TikaServerTextExtractor;
|
||||
use SilverStripe\TextExtraction\Rest\TikaRestClient;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
|
||||
/**
|
||||
* @group tika-tests
|
||||
@ -39,13 +40,13 @@ class TikaServerTextExtractorTest extends SapphireTest
|
||||
/**
|
||||
* @param string $version
|
||||
* @param bool $expected
|
||||
* @dataProvider isAvailableProvider
|
||||
*/
|
||||
#[DataProvider('isAvailableProvider')]
|
||||
public function testIsAvailable($version, $expected)
|
||||
{
|
||||
/** @var MockObject|TikaServerTextExtractor $extractor */
|
||||
$extractor = $this->getMockBuilder(TikaServerTextExtractor::class)
|
||||
->setMethods(['getClient', 'getServerEndpoint'])
|
||||
->onlyMethods(['getClient', 'getServerEndpoint'])
|
||||
->getMock();
|
||||
|
||||
$client = $this->createMock(TikaRestClient::class);
|
||||
@ -62,7 +63,7 @@ class TikaServerTextExtractorTest extends SapphireTest
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function isAvailableProvider()
|
||||
public static function isAvailableProvider()
|
||||
{
|
||||
return [
|
||||
['1.5.2', false],
|
||||
|
Loading…
Reference in New Issue
Block a user