Skip to content

Commit 6397454

Browse files
committed
Merge pull request #19 from Flowpack/remove-contextinterface
[TASK] Adjust to removal of ContextInterface
2 parents 644e1e0 + ee3db6c commit 6397454

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Service/NodeSearchService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Flowpack\ElasticSearch\Domain\Model\Client;
1717
use Flowpack\ElasticSearch\Domain\Model\Index;
1818
use TYPO3\Flow\Annotations as Flow;
19-
use TYPO3\TYPO3CR\Domain\Service\ContextInterface;
19+
use TYPO3\TYPO3CR\Domain\Service\Context;
2020

2121
/**
2222
* Search service for TYPO3CR nodes
@@ -86,13 +86,13 @@ public function initializeObject() {
8686
*
8787
* @param string $nodePath Parent node path where search starts. All nodes below that path are considered.
8888
* @param string $sortingFieldName Name of the node property which is going to be used as a sorting criteria. Its value can be string, numeric or a date
89-
* @param \TYPO3\TYPO3CR\Domain\Service\ContextInterface $contentContext The content context, for example derived from the "current node"
89+
* @param \TYPO3\TYPO3CR\Domain\Service\Context $contentContext The content context, for example derived from the "current node"
9090
* @param integer $maximumResults The number of maximum results. If "1" is specified, this function will still return an array, but with 1 element.
9191
* @param integer $fromResult For pagination: the result number to start with. Index starts a 0.
9292
* @param string $nodeTypeFilter (currently) a single node type name to filter the results
9393
* @return array<\TYPO3\TYPO3CR\Domain\Model\Node>|NULL
9494
*/
95-
public function findRecent($nodePath, $sortingFieldName, ContextInterface $contentContext, $maximumResults = 100, $fromResult = NULL, $nodeTypeFilter = NULL) {
95+
public function findRecent($nodePath, $sortingFieldName, Context $contentContext, $maximumResults = 100, $fromResult = NULL, $nodeTypeFilter = NULL) {
9696
$searchQuery = array(
9797
'query' => array(
9898
'prefix' => array(

Tests/Unit/Eel/ElasticSearchQueryBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ElasticSearchQueryBuilderTest extends \TYPO3\Flow\Tests\UnitTestCase {
2626
public function setUp() {
2727
$node = $this->getMock('TYPO3\TYPO3CR\Domain\Model\NodeInterface');
2828
$node->expects($this->any())->method('getPath')->will($this->returnValue('/foo/bar'));
29-
$mockContext = $this->getMock('TYPO3\TYPO3CR\Domain\Service\ContextInterface');
29+
$mockContext = $this->getMockBuilder('TYPO3\TYPO3CR\Domain\Service\Context')->disableOriginalConstructor()->getMock();
3030
$node->expects($this->any())->method('getContext')->will($this->returnValue($mockContext));
3131

3232
$mockWorkspace = $this->getMockBuilder('TYPO3\TYPO3CR\Domain\Model\Workspace')->disableOriginalConstructor()->getMock();

0 commit comments

Comments
 (0)