Merge pull request #50 from DanielSiepmann/feature/upgrade-phpunit

TASK: Upgrade phpunit to latest stable 5.7
This commit is contained in:
Daniel Siepmann 2017-06-27 14:35:05 +02:00 committed by GitHub
commit 0136c10f12
3 changed files with 10 additions and 19 deletions

View file

@ -41,15 +41,10 @@ abstract class AbstractDataHandlerTest extends AbstractFunctionalTestCase
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$this->subject = $this->getAccessibleMock(
DataHandlerService::class,
[
'add',
'update',
'delete',
],
[$objectManager->get(ConfigurationContainerInterface::class)]
);
$this->subject = $this->getMockBuilder(DataHandlerService::class)
->setConstructorArgs([$objectManager->get(ConfigurationContainerInterface::class)])
->setMethods(['add', 'update', 'delete'])
->getMock();
// This way TYPO3 will use our mock instead of a new instance.
$GLOBALS['T3_VAR']['getUserObj']['&' . DataHandlerHook::class] = new DataHandlerHook($this->subject);

View file

@ -44,15 +44,11 @@ class TcaIndexerTest extends AbstractFunctionalTestCase
$objectManager->get(RelationResolver::class),
$objectManager->get(ConfigurationContainerInterface::class)
);
$connection = $this->getAccessibleMock(
Elasticsearch::class,
[
'addDocuments',
],
[],
'',
false
);
$connection = $this->getMockBuilder(Elasticsearch::class)
->setMethods(['addDocuments'])
->disableOriginalConstructor()
->getMock();
$connection->expects($this->once())
->method('addDocuments')

View file

@ -21,7 +21,7 @@
"ruflin/elastica": "~3.2"
},
"require-dev": {
"phpunit/phpunit": "~4.8.0"
"phpunit/phpunit": "~5.7.0"
},
"config": {
"optimize-autoloader": true,