[BUGFIX] Fix Query unit test and two typehints 59/28759/3
authorMarkus Klein <klein.t3@mfc-linz.at>
Tue, 25 Mar 2014 12:51:11 +0000 (13:51 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 25 Mar 2014 13:25:28 +0000 (14:25 +0100)
Follows #57263

Fixes a change of interface in the unit test for Query.
Moreover two more places miss the new interface typehint.

Resolves: #57286
Releases: 6.2
Change-Id: I528656055782e22989b8fd7cc8a652d8de829663
Reviewed-on: https://review.typo3.org/28759
Reviewed-by: Felix Oertel
Tested-by: Felix Oertel
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/extbase/Classes/Persistence/Generic/Qom/QueryObjectModelFactory.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryTest.php

index 4449d0d..d22f697 100644 (file)
@@ -158,7 +158,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\LowerCaseInterface the operand; non-null
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
-       public function lowerCase(DynamicOperandInterface $operand) {
+       public function lowerCase(PropertyValueInterface $operand) {
                return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\LowerCase', $operand);
        }
 
@@ -169,7 +169,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\UpperCaseInterface the operand; non-null
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
-       public function upperCase(DynamicOperandInterface $operand) {
+       public function upperCase(PropertyValueInterface $operand) {
                return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\UpperCase', $operand);
        }
 
index 1bb0f69..5d2e15d 100644 (file)
@@ -164,7 +164,7 @@ class QueryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                /** @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject $objectManager */
                $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
                /** @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface $dynamicOperand */
-               $dynamicOperand = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\DynamicOperandInterface');
+               $dynamicOperand = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\PropertyValueInterface');
                $objectManager->expects($this->any())->method('get')->will($this->returnValue($dynamicOperand));
                /** @var $qomFactory \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory */
                $qomFactory = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\QueryObjectModelFactory', array('comparison'));