mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 09:16:21 +01:00
TASK: Upgrade phpunit to latest stable 5.7
* To make use of new features. * To reduce cost of later migrations. * Migrate deprecated calls from lower TYPO3 api.
This commit is contained in:
parent
d26172b5cb
commit
9a482381c0
3 changed files with 10 additions and 19 deletions
|
@ -41,15 +41,10 @@ abstract class AbstractDataHandlerTest extends AbstractFunctionalTestCase
|
||||||
|
|
||||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||||
|
|
||||||
$this->subject = $this->getAccessibleMock(
|
$this->subject = $this->getMockBuilder(DataHandlerService::class)
|
||||||
DataHandlerService::class,
|
->setConstructorArgs([$objectManager->get(ConfigurationContainerInterface::class)])
|
||||||
[
|
->setMethods(['add', 'update', 'delete'])
|
||||||
'add',
|
->getMock();
|
||||||
'update',
|
|
||||||
'delete',
|
|
||||||
],
|
|
||||||
[$objectManager->get(ConfigurationContainerInterface::class)]
|
|
||||||
);
|
|
||||||
|
|
||||||
// This way TYPO3 will use our mock instead of a new instance.
|
// This way TYPO3 will use our mock instead of a new instance.
|
||||||
$GLOBALS['T3_VAR']['getUserObj']['&' . DataHandlerHook::class] = new DataHandlerHook($this->subject);
|
$GLOBALS['T3_VAR']['getUserObj']['&' . DataHandlerHook::class] = new DataHandlerHook($this->subject);
|
||||||
|
|
|
@ -44,15 +44,11 @@ class TcaIndexerTest extends AbstractFunctionalTestCase
|
||||||
$objectManager->get(RelationResolver::class),
|
$objectManager->get(RelationResolver::class),
|
||||||
$objectManager->get(ConfigurationContainerInterface::class)
|
$objectManager->get(ConfigurationContainerInterface::class)
|
||||||
);
|
);
|
||||||
$connection = $this->getAccessibleMock(
|
|
||||||
Elasticsearch::class,
|
$connection = $this->getMockBuilder(Elasticsearch::class)
|
||||||
[
|
->setMethods(['addDocuments'])
|
||||||
'addDocuments',
|
->disableOriginalConstructor()
|
||||||
],
|
->getMock();
|
||||||
[],
|
|
||||||
'',
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
$connection->expects($this->once())
|
$connection->expects($this->once())
|
||||||
->method('addDocuments')
|
->method('addDocuments')
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"ruflin/elastica": "~3.2"
|
"ruflin/elastica": "~3.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.8.0"
|
"phpunit/phpunit": "~5.7.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
|
|
Loading…
Reference in a new issue