[!!!][TASK] Extbase: Remove preparsing of queries
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Functional / Persistence / QueryParserTest.php
index 562308c..eac68cc 100644 (file)
@@ -19,11 +19,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 class QueryParserTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
 {
     /**
-     * @var \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser
-     */
-    protected $queryParser;
-
-    /**
      * @var array
      */
     protected $testExtensionsToLoad = array('typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example');
@@ -57,85 +52,12 @@ class QueryParserTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/post-tag-mm.xml');
 
         $this->objectManager = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
-        $this->queryParser = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::class);
         $this->blogRepository = $this->objectManager->get(\ExtbaseTeam\BlogExample\Domain\Repository\BlogRepository::class);
     }
 
     /**
      * @test
      */
-    public function preparseQueryTakesOperatorsIntoHash()
-    {
-        $queryWithEquals = $this->blogRepository->createQuery();
-
-        $queryWithEquals->matching(
-            $queryWithEquals->equals('uid', 1)
-        );
-
-        list($hashWithEquals) = $this->queryParser->preparseQuery($queryWithEquals);
-
-        $queryWithIn = $this->blogRepository->createQuery();
-
-        $queryWithIn->matching(
-            $queryWithIn->in('uid', array(1))
-        );
-
-        list($hashWithIn) = $this->queryParser->preparseQuery($queryWithIn);
-
-        $this->assertNotSame($hashWithEquals, $hashWithIn);
-    }
-
-    /**
-     * @test
-     */
-    public function preparseQueryHashDiffersForIsNullOperator()
-    {
-        $queryWithIsNull = $this->blogRepository->createQuery();
-
-        $queryWithIsNull->matching(
-            $queryWithIsNull->equals('title', null)
-        );
-
-        list($hashWithIsNull) = $this->queryParser->preparseQuery($queryWithIsNull);
-
-        $queryWithoutIsNull = $this->blogRepository->createQuery();
-
-        $queryWithoutIsNull->matching(
-            $queryWithoutIsNull->equals('title', '')
-        );
-
-        list($hashWithoutIsNull) = $this->queryParser->preparseQuery($queryWithoutIsNull);
-
-        $this->assertNotSame($hashWithIsNull, $hashWithoutIsNull);
-    }
-
-    /**
-     * @test
-     */
-    public function preparseQueryHashDiffersForEqualsCaseSensitiveArgument()
-    {
-        $queryCaseSensitiveFalse = $this->blogRepository->createQuery();
-
-        $queryCaseSensitiveFalse->matching(
-            $queryCaseSensitiveFalse->equals('title', 'PoSt1', false)
-        );
-
-        list($hashWithCaseSensitiveFalse) = $this->queryParser->preparseQuery($queryCaseSensitiveFalse);
-
-        $queryCaseSensitiveTrue = $this->blogRepository->createQuery();
-
-        $queryCaseSensitiveTrue->matching(
-            $queryCaseSensitiveTrue->equals('title', 'PoSt1', true)
-        );
-
-        list($hashWithCaseSensitiveTrue) = $this->queryParser->preparseQuery($queryCaseSensitiveTrue);
-
-        $this->assertNotSame($hashWithCaseSensitiveFalse, $hashWithCaseSensitiveTrue);
-    }
-
-    /**
-     * @test
-     */
     public function queryWithMultipleRelationsToIdenticalTablesReturnsExpectedResultForOrQuery()
     {
         /** @var \ExtbaseTeam\BlogExample\Domain\Repository\PostRepository $postRepository */