1414use Flowpack \ElasticSearch \ContentRepositoryAdaptor \Command \NodeIndexCommandController ;
1515use Flowpack \ElasticSearch \ContentRepositoryAdaptor \Eel \ElasticSearchQueryBuilder ;
1616use Flowpack \ElasticSearch \ContentRepositoryAdaptor \Eel \ElasticSearchQueryResult ;
17+ use TYPO3 \Flow \Persistence \QueryResultInterface ;
1718use TYPO3 \TYPO3CR \Domain \Model \NodeInterface ;
1819use TYPO3 \TYPO3CR \Domain \Model \Workspace ;
1920use TYPO3 \TYPO3CR \Domain \Repository \NodeDataRepository ;
@@ -67,19 +68,20 @@ class ElasticSearchQueryTest extends \TYPO3\Flow\Tests\FunctionalTestCase
6768 */
6869 protected $ nodeDataRepository ;
6970
70-
71+ /**
72+ * @var boolean
73+ */
7174 protected static $ indexInitialized = false ;
7275
73-
7476 public function setUp ()
7577 {
7678 parent ::setUp ();
77- $ this ->workspaceRepository = $ this ->objectManager ->get (' TYPO3\TYPO3CR\Domain\Repository\ WorkspaceRepository' );
79+ $ this ->workspaceRepository = $ this ->objectManager ->get (WorkspaceRepository::class );
7880 $ liveWorkspace = new Workspace ('live ' );
7981 $ this ->workspaceRepository ->add ($ liveWorkspace );
8082
81- $ this ->nodeTypeManager = $ this ->objectManager ->get (' TYPO3\TYPO3CR\Domain\Service\ NodeTypeManager' );
82- $ this ->contextFactory = $ this ->objectManager ->get (' TYPO3\TYPO3CR\Domain\Service\ ContextFactoryInterface' );
83+ $ this ->nodeTypeManager = $ this ->objectManager ->get (NodeTypeManager::class );
84+ $ this ->contextFactory = $ this ->objectManager ->get (ContextFactoryInterface::class );
8385 $ this ->context = $ this ->contextFactory ->create ([
8486 'workspaceName ' => 'live ' ,
8587 'dimensions ' => ['language ' => ['en_US ' ]],
@@ -90,9 +92,9 @@ public function setUp()
9092 $ this ->siteNode = $ rootNode ->createNode ('welcome ' , $ this ->nodeTypeManager ->getNodeType ('TYPO3.Neos.NodeTypes:Page ' ));
9193 $ this ->siteNode ->setProperty ('title ' , 'welcome ' );
9294
93- $ this ->nodeDataRepository = $ this ->objectManager ->get (' TYPO3\TYPO3CR\Domain\Repository\ NodeDataRepository' );
95+ $ this ->nodeDataRepository = $ this ->objectManager ->get (NodeDataRepository::class );
9496
95- $ this ->nodeIndexCommandController = $ this ->objectManager ->get (' Flowpack\ElasticSearch\ContentRepositoryAdaptor\Command\ NodeIndexCommandController' );
97+ $ this ->nodeIndexCommandController = $ this ->objectManager ->get (NodeIndexCommandController::class );
9698
9799 $ this ->createNodesForNodeSearchTest ();
98100 }
@@ -104,12 +106,13 @@ public function tearDown()
104106 }
105107
106108 /**
107- * @return \Flowpack\ElasticSearch\ContentRepositoryAdaptor\Eel\ ElasticSearchQueryBuilder
109+ * @return ElasticSearchQueryBuilder
108110 */
109111 protected function getQueryBuilder ()
110112 {
111113 /** @var ElasticSearchQueryBuilder $query */
112- $ query = $ this ->objectManager ->get ('Flowpack\ElasticSearch\ContentRepositoryAdaptor\Eel\ElasticSearchQueryBuilder ' );
114+ $ query = $ this ->objectManager ->get (ElasticSearchQueryBuilder::class);
115+
113116 return $ query ->query ($ this ->siteNode );
114117 }
115118
@@ -221,9 +224,9 @@ public function nodesWillBeSortedDesc()
221224 ->sortDesc ('title ' )
222225 ->execute ();
223226
224- /** @var \TYPO3\Flow\Persistence\ QueryResultInterface $result $node */
227+ /** @var QueryResultInterface $result $node */
225228
226- $ this ->assertInstanceOf (\ TYPO3 \ Flow \ Persistence \ QueryResultInterface::class, $ result );
229+ $ this ->assertInstanceOf (QueryResultInterface::class, $ result );
227230 $ this ->assertCount (3 , $ result , 'The result should have 3 items ' );
228231 $ this ->assertEquals (3 , $ result ->count (), 'Count should be 3 ' );
229232
0 commit comments