[TASK] Replace ObjectManager create with get
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Sun, 10 Feb 2013 10:55:05 +0000 (11:55 +0100)
committerAndreas Wolf <andreas.wolf@typo3.org>
Sun, 10 Feb 2013 11:18:42 +0000 (12:18 +0100)
Since Extbase ObjectManager::create is deprecated replace all
usages of the create method with get.

Change-Id: I4a438565d8512c8f892cef5b63fb6483fd74d712
Resolves: #45323
Releases: 6.1
Reviewed-on: https://review.typo3.org/18175
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
36 files changed:
typo3/sysext/extbase/Classes/Domain/Repository/BackendUserGroupRepository.php
typo3/sysext/extbase/Classes/Domain/Repository/BackendUserRepository.php
typo3/sysext/extbase/Classes/Domain/Repository/CategoryRepository.php
typo3/sysext/extbase/Classes/Domain/Repository/FileMountRepository.php
typo3/sysext/extbase/Classes/Mvc/Cli/RequestHandler.php
typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php
typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php
typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php
typo3/sysext/extbase/Classes/Mvc/Controller/Arguments.php
typo3/sysext/extbase/Classes/Mvc/Controller/CommandController.php
typo3/sysext/extbase/Classes/Mvc/Web/BackendRequestHandler.php
typo3/sysext/extbase/Classes/Mvc/Web/FrontendRequestHandler.php
typo3/sysext/extbase/Classes/Mvc/Web/RequestBuilder.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Persistence/Generic/Qom/QueryObjectModelFactory.php
typo3/sysext/extbase/Classes/Persistence/Generic/Query.php
typo3/sysext/extbase/Classes/Persistence/Generic/QueryFactory.php
typo3/sysext/extbase/Classes/Property/Mapper.php
typo3/sysext/extbase/Classes/Property/TypeConverter/AbstractFileCollectionConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/AbstractFileFolderConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/PersistentObjectConverter.php
typo3/sysext/extbase/Classes/Reflection/ReflectionService.php
typo3/sysext/extbase/Classes/Scheduler/TaskExecutor.php
typo3/sysext/extbase/Tests/Unit/Domain/Repository/BackendUserGroupRepositoryTest.php
typo3/sysext/extbase/Tests/Unit/Domain/Repository/BackendUserRepositoryTest.php
typo3/sysext/extbase/Tests/Unit/Domain/Repository/CategoryRepositoryTest.php
typo3/sysext/extbase/Tests/Unit/Domain/Repository/FileMountRepositoryTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ArgumentBehaviorBeforeExtbase14Test.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ArgumentsTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/MvcPropertyMappingConfigurationServiceTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Web/RequestBuilderTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryFactoryTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryTest.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/PersistentObjectConverterTest.php

index 1d90682..f06cdac 100644 (file)
@@ -41,7 +41,7 @@ class BackendUserGroupRepository extends \TYPO3\CMS\Extbase\Persistence\Reposito
         */
        public function initializeObject() {
                /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
-               $querySettings = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
+               $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
                $querySettings->setRespectStoragePage(FALSE);
                $this->setDefaultQuerySettings($querySettings);
        }
index 37130e8..3c26ec9 100644 (file)
@@ -41,7 +41,7 @@ class BackendUserRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
         */
        public function initializeObject() {
                /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
-               $querySettings = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
+               $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
                $querySettings->setRespectStoragePage(FALSE);
                $this->setDefaultQuerySettings($querySettings);
        }
index 04ea68a..a1e5c2f 100755 (executable)
@@ -41,7 +41,7 @@ class CategoryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
         */
        public function initializeObject() {
                /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
-               $querySettings = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
+               $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
                $querySettings->setRespectStoragePage(FALSE);
                $this->setDefaultQuerySettings($querySettings);
        }
index f8150ac..c255834 100644 (file)
@@ -41,7 +41,7 @@ class FileMountRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
         */
        public function initializeObject() {
                /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */
-               $querySettings = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
+               $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
                $querySettings->setRespectStoragePage(FALSE);
                $this->setDefaultQuerySettings($querySettings);
        }
index 8f2d1e1..608ab98 100644 (file)
@@ -91,7 +91,7 @@ class RequestHandler implements \TYPO3\CMS\Extbase\Mvc\RequestHandlerInterface {
        public function handleRequest() {
                $request = $this->requestBuilder->build();
                /** @var $response \TYPO3\CMS\Extbase\Mvc\Cli\Response */
-               $response = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
+               $response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
                $this->dispatcher->dispatch($request, $response);
                $response->send();
        }
index de04ef3..5a8bc24 100644 (file)
@@ -177,7 +177,7 @@ abstract class AbstractController implements \TYPO3\CMS\Extbase\Mvc\Controller\C
         */
        public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
                $this->objectManager = $objectManager;
-               $this->arguments = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Arguments');
+               $this->arguments = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Arguments');
        }
 
        /**
@@ -246,7 +246,7 @@ abstract class AbstractController implements \TYPO3\CMS\Extbase\Mvc\Controller\C
                $this->request = $request;
                $this->request->setDispatched(TRUE);
                $this->response = $response;
-               $this->uriBuilder = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
+               $this->uriBuilder = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
                $this->uriBuilder->setRequest($request);
                $this->initializeControllerArgumentsBaseValidators();
                $this->mapRequestArgumentsToControllerArguments();
@@ -260,7 +260,7 @@ abstract class AbstractController implements \TYPO3\CMS\Extbase\Mvc\Controller\C
         * @api
         */
        protected function buildControllerContext() {
-               $controllerContext = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext');
+               $controllerContext = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext');
                $controllerContext->setRequest($this->request);
                $controllerContext->setResponse($this->response);
                if ($this->arguments !== NULL) {
@@ -438,7 +438,7 @@ abstract class AbstractController implements \TYPO3\CMS\Extbase\Mvc\Controller\C
                                }
                        }
                        /** @var $validator ArgumentsValidator */
-                       $validator = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ArgumentsValidator');
+                       $validator = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ArgumentsValidator');
                        $this->deprecatedPropertyMapper->mapAndValidate($allPropertyNames, $this->request->getArguments(), $this->arguments, $optionalPropertyNames, $validator);
                        $this->argumentsMappingResults = $this->deprecatedPropertyMapper->getMappingResults();
                }
index a200797..88b9853 100644 (file)
@@ -158,7 +158,7 @@ class ActionController extends \TYPO3\CMS\Extbase\Mvc\Controller\AbstractControl
                $this->request = $request;
                $this->request->setDispatched(TRUE);
                $this->response = $response;
-               $this->uriBuilder = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
+               $this->uriBuilder = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
                $this->uriBuilder->setRequest($request);
                $this->actionMethodName = $this->resolveActionMethodName();
                $this->initializeActionMethodArguments();
@@ -334,7 +334,7 @@ class ActionController extends \TYPO3\CMS\Extbase\Mvc\Controller\AbstractControl
                $viewObjectName = $this->resolveViewObjectName();
                if ($viewObjectName !== FALSE) {
                        /** @var $view \TYPO3\CMS\Extbase\Mvc\View\ViewInterface */
-                       $view = $this->objectManager->create($viewObjectName);
+                       $view = $this->objectManager->get($viewObjectName);
                        $this->setViewConfiguration($view);
                        if ($view->canRender($this->controllerContext) === FALSE) {
                                unset($view);
@@ -342,14 +342,14 @@ class ActionController extends \TYPO3\CMS\Extbase\Mvc\Controller\AbstractControl
                }
                if (!isset($view) && $this->defaultViewObjectName != '') {
                        /** @var $view \TYPO3\CMS\Extbase\Mvc\View\ViewInterface */
-                       $view = $this->objectManager->create($this->defaultViewObjectName);
+                       $view = $this->objectManager->get($this->defaultViewObjectName);
                        $this->setViewConfiguration($view);
                        if ($view->canRender($this->controllerContext) === FALSE) {
                                unset($view);
                        }
                }
                if (!isset($view)) {
-                       $view = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\View\\NotFoundView');
+                       $view = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\View\\NotFoundView');
                        $view->assign('errorMessage', 'No template was found. View could not be resolved for action "' . $this->request->getControllerActionName() . '"');
                }
                $view->setControllerContext($this->controllerContext);
index f9d5cad..c416b93 100644 (file)
@@ -392,7 +392,7 @@ class Argument {
         */
        public function setNewValidatorConjunction(array $objectNames) {
                if ($this->validator === NULL) {
-                       $this->validator = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Validation\\Validator\\ConjunctionValidator');
+                       $this->validator = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Validation\\Validator\\ConjunctionValidator');
                }
                foreach ($objectNames as $objectName) {
                        if (!class_exists($objectName)) {
@@ -504,7 +504,7 @@ class Argument {
         * @return object Either the object matching the uid or, if none or more than one object was found, NULL
         */
        protected function findObjectByUid($uid) {
-               $query = $this->queryFactory->create($this->dataType);
+               $query = $this->queryFactory->get($this->dataType);
                $query->getQuerySettings()->setRespectSysLanguage(FALSE);
                $query->getQuerySettings()->setRespectStoragePage(FALSE);
                return $query->matching($query->equals('uid', $uid))->execute()->getFirst();
index 1595829..78ca45f 100644 (file)
@@ -150,7 +150,7 @@ class Arguments extends \ArrayObject {
         */
        public function addNewArgument($name, $dataType = 'Text', $isRequired = FALSE, $defaultValue = NULL) {
                /** @var $argument \TYPO3\CMS\Extbase\Mvc\Controller\Argument */
-               $argument = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', $name, $dataType);
+               $argument = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', $name, $dataType);
                $argument->setRequired($isRequired);
                $argument->setDefaultValue($defaultValue);
                $this->addArgument($argument);
index 315da71..140251c 100644 (file)
@@ -79,7 +79,7 @@ class CommandController implements \TYPO3\CMS\Extbase\Mvc\Controller\CommandCont
         */
        public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
                $this->objectManager = $objectManager;
-               $this->arguments = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Arguments');
+               $this->arguments = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Arguments');
        }
 
        /**
index 3fba1cd..920a37a 100644 (file)
@@ -43,7 +43,7 @@ class BackendRequestHandler extends \TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHa
                $requestHashService = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Security\\Channel\\RequestHashService');
                $requestHashService->verifyRequest($request);
                /** @var $response \TYPO3\CMS\Extbase\Mvc\ResponseInterface */
-               $response = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response');
+               $response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response');
                $this->dispatcher->dispatch($request, $response);
                return $response;
        }
index 1b6d34d..e6e23fc 100644 (file)
@@ -80,7 +80,7 @@ class FrontendRequestHandler extends \TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestH
                        $request->setIsCached(FALSE);
                }
                /** @var $response \TYPO3\CMS\Extbase\Mvc\ResponseInterface */
-               $response = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response');
+               $response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response');
                $this->dispatcher->dispatch($request, $response);
                return $response;
        }
index 36f5281..fed7e20 100644 (file)
@@ -159,7 +159,7 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface {
                $controllerName = $this->resolveControllerName($parameters);
                $actionName = $this->resolveActionName($controllerName, $parameters);
                /** @var $request \TYPO3\CMS\Extbase\Mvc\Web\Request */
-               $request = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request');
+               $request = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request');
                if ($this->vendorName !== NULL) {
                        $request->setControllerVendorName($this->vendorName);
                }
index df03ee3..14caee1 100644 (file)
@@ -159,7 +159,7 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface {
                        }
                }
                /** @var $dataMap \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap */
-               $dataMap = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMap', $className, $tableName, $recordType, $subclasses);
+               $dataMap = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMap', $className, $tableName, $recordType, $subclasses);
                $dataMap = $this->addMetaDataColumnNames($dataMap, $tableName);
                // $classPropertyNames = $this->reflectionService->getClassPropertyNames($className);
                $tcaColumnsDefinition = $this->getColumnsDefinition($tableName);
index 3cb11b3..b42d876 100644 (file)
@@ -323,12 +323,12 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
                $propertyMetaData = $this->reflectionService->getClassSchema(get_class($parentObject))->getProperty($propertyName);
                if ($enableLazyLoading === TRUE && $propertyMetaData['lazy']) {
                        if (in_array($propertyMetaData['type'], array('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', 'Tx_Extbase_Persistence_ObjectStorage'), TRUE)) {
-                               $result = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\LazyObjectStorage', $parentObject, $propertyName, $fieldValue);
+                               $result = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\LazyObjectStorage', $parentObject, $propertyName, $fieldValue);
                        } else {
                                if (empty($fieldValue)) {
                                        $result = NULL;
                                } else {
-                                       $result = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\LazyLoadingProxy', $parentObject, $propertyName, $fieldValue);
+                                       $result = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\LazyLoadingProxy', $parentObject, $propertyName, $fieldValue);
                                }
                        }
                } else {
@@ -382,7 +382,7 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
        protected function getPreparedQuery(\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject, $propertyName, $fieldValue = '') {
                $columnMap = $this->getDataMap(get_class($parentObject))->getColumnMap($propertyName);
                $type = $this->getType(get_class($parentObject), $propertyName);
-               $query = $this->queryFactory->create($type);
+               $query = $this->queryFactory->get($type);
                $query->getQuerySettings()->setRespectStoragePage(FALSE);
                $query->getQuerySettings()->setRespectSysLanguage(FALSE);
                if ($columnMap->getTypeOfRelation() === \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::RELATION_HAS_MANY) {
index ae99419..b062790 100644 (file)
@@ -57,7 +57,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
                if ($selectorName === '') {
                        $selectorName = $nodeTypeName;
                }
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Selector', $selectorName, $nodeTypeName);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Selector', $selectorName, $nodeTypeName);
        }
 
        /**
@@ -69,7 +69,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement
         */
        public function statement($statement, array $boundVariables = array(), $language = \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement::TYPO3_SQL_MYSQL) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Statement', $statement, $boundVariables, $language);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Statement', $statement, $boundVariables, $language);
        }
 
        /**
@@ -82,7 +82,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\JoinInterface the join; non-null
         */
        public function join(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $left, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $right, $joinType, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\JoinConditionInterface $joinCondition) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Join', $left, $right, $joinType, $joinCondition);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Join', $left, $right, $joinType, $joinCondition);
        }
 
        /**
@@ -96,7 +96,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function equiJoinCondition($selector1Name, $property1Name, $selector2Name, $property2Name) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\EquiJoinCondition', $selector1Name, $property1Name, $selector2Name, $property2Name);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\EquiJoinCondition', $selector1Name, $property1Name, $selector2Name, $property2Name);
        }
 
        /**
@@ -108,7 +108,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function _and(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint1, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint2) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\LogicalAnd', $constraint1, $constraint2);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\LogicalAnd', $constraint1, $constraint2);
        }
 
        /**
@@ -120,7 +120,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function _or(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint1, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint2) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\LogicalOr', $constraint1, $constraint2);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\LogicalOr', $constraint1, $constraint2);
        }
 
        /**
@@ -131,7 +131,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function not(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\LogicalNot', $constraint);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\LogicalNot', $constraint);
        }
 
        /**
@@ -144,7 +144,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function comparison(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface $operand1, $operator, $operand2) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Comparison', $operand1, $operator, $operand2);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Comparison', $operand1, $operator, $operand2);
        }
 
        /**
@@ -156,7 +156,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function propertyValue($propertyName, $selectorName = '') {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\PropertyValue', $propertyName, $selectorName);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\PropertyValue', $propertyName, $selectorName);
        }
 
        /**
@@ -167,7 +167,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function lowerCase(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface $operand) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\LowerCase', $operand);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\LowerCase', $operand);
        }
 
        /**
@@ -178,7 +178,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function upperCase(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface $operand) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\UpperCase', $operand);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\UpperCase', $operand);
        }
 
        /**
@@ -191,7 +191,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function ascending(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface $operand) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Ordering', $operand, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelConstantsInterface::JCR_ORDER_ASCENDING);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Ordering', $operand, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelConstantsInterface::JCR_ORDER_ASCENDING);
        }
 
        /**
@@ -204,7 +204,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function descending(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\DynamicOperandInterface $operand) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Ordering', $operand, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelConstantsInterface::JCR_ORDER_DESCENDING);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Ordering', $operand, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelConstantsInterface::JCR_ORDER_DESCENDING);
        }
 
        /**
@@ -215,7 +215,7 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\RepositoryException if the operation otherwise fails
         */
        public function bindVariable($bindVariableName) {
-               return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\BindVariableValue', $bindVariableName);
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\BindVariableValue', $bindVariableName);
        }
 }
 
index 5cd0ba6..1a61b87 100644 (file)
@@ -244,7 +244,7 @@ class Query implements \TYPO3\CMS\Extbase\Persistence\QueryInterface {
                if ($this->getQuerySettings()->getReturnRawQueryResult() === TRUE) {
                        return $this->persistenceManager->getObjectDataByQuery($this);
                } else {
-                       return $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\QueryResultInterface', $this);
+                       return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\QueryResultInterface', $this);
                }
        }
 
index 9e55be2..511457c 100644 (file)
@@ -78,8 +78,8 @@ class QueryFactory implements \TYPO3\CMS\Extbase\Persistence\Generic\QueryFactor
         * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception
         */
        public function create($className) {
-               $query = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface', $className);
-               $querySettings = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QuerySettingsInterface');
+               $query = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface', $className);
+               $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QuerySettingsInterface');
 
                $dataMap = $this->dataMapper->getDataMap($className);
                if ($dataMap->getIsStatic() || $dataMap->getRootLevel()) {
index ae16888..a2ed23a 100644 (file)
@@ -280,7 +280,7 @@ class Mapper implements \TYPO3\CMS\Core\SingletonInterface {
                                $propertyValue = NULL;
                        } else {
                                try {
-                                       $propertyValue = $this->objectManager->create($targetType, $propertyValue);
+                                       $propertyValue = $this->objectManager->get($targetType, $propertyValue);
                                } catch (\Exception $e) {
                                        $propertyValue = NULL;
                                }
@@ -309,7 +309,7 @@ class Mapper implements \TYPO3\CMS\Core\SingletonInterface {
                                                }
                                        }
                                } else {
-                                       $newObject = $this->objectManager->create($targetType);
+                                       $newObject = $this->objectManager->get($targetType);
                                        if ($this->map(array_keys($propertyValue), $propertyValue, $newObject)) {
                                                $propertyValue = $newObject;
                                        } else {
index a1da8ce..0806014 100644 (file)
@@ -74,7 +74,7 @@ abstract class AbstractFileCollectionConverter extends \TYPO3\CMS\Extbase\Proper
                        throw new \TYPO3\CMS\Extbase\Property\Exception('Expected object of type "' . $this->expectedObjectType . '" but got ' . get_class($object), 1342895975);
                }
                /** @var $subject \TYPO3\CMS\Extbase\Domain\Model\AbstractFileCollection */
-               $subject = $this->objectManager->create($targetType);
+               $subject = $this->objectManager->get($targetType);
                $subject->setObject($object);
                return $subject;
        }
index 623adc3..a44a24b 100644 (file)
@@ -74,7 +74,7 @@ abstract class AbstractFileFolderConverter extends \TYPO3\CMS\Extbase\Property\T
                        throw new \TYPO3\CMS\Extbase\Property\Exception('Expected object of type "' . $this->expectedObjectType . '" but got ' . get_class($object), 1342895975);
                }
                /** @var $subject \TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder */
-               $subject = $this->objectManager->create($targetType);
+               $subject = $this->objectManager->get($targetType);
                $subject->setOriginalResource($object);
                return $subject;
        }
index c4b17f2..d330f84 100644 (file)
@@ -250,7 +250,7 @@ class PersistentObjectConverter extends \TYPO3\CMS\Extbase\Property\TypeConverte
                                throw new \TYPO3\CMS\Extbase\Property\Exception\InvalidTargetException('Missing constructor argument "' . $constructorArgumentName . '" for object of type "' . $objectType . '".', 1268734872);
                        }
                }
-               return call_user_func_array(array($this->objectManager, 'create'), array_merge(array($objectType), $constructorArguments));
+               return call_user_func_array(array($this->objectManager, 'get'), array_merge(array($objectType), $constructorArguments));
        }
 }
 
index 5878140..353c4ac 100644 (file)
@@ -424,7 +424,7 @@ class ReflectionService implements \TYPO3\CMS\Core\SingletonInterface {
                if (!class_exists($className)) {
                        throw new \TYPO3\CMS\Extbase\Reflection\Exception\UnknownClassException('The classname "' . $className . '" was not found and thus can not be reflected.', 1278450972);
                }
-               $classSchema = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Reflection\\ClassSchema', $className);
+               $classSchema = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Reflection\\ClassSchema', $className);
                if (is_subclass_of($className, 'TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity')) {
                        $classSchema->setModelType(\TYPO3\CMS\Extbase\Reflection\ClassSchema::MODELTYPE_ENTITY);
                        if (strpos($className, '\\') !== FALSE) {
index 20863a0..956c74d 100644 (file)
@@ -90,8 +90,8 @@ class TaskExecutor implements \TYPO3\CMS\Core\SingletonInterface {
         * Initializes Request, Response and Dispatcher
         */
        public function initializeObject() {
-               $this->request = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Request');
-               $this->response = $this->objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
+               $this->request = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Request');
+               $this->response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
                $this->dispatcher = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Dispatcher');
        }
 
index 8fe0785..c9a3738 100644 (file)
@@ -40,7 +40,7 @@ class BackendUserGroupRepositoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseT
                $fixture->injectPersistenceManager(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager'));
                $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
                $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
-               $objectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
                $fixture->initializeObject();
        }
 
@@ -52,7 +52,7 @@ class BackendUserGroupRepositoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseT
                /** @var $fixture \TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository */
                $fixture = $this->getMock('TYPO3\\CMS\\Extbase\\Domain\\Repository\\BackendUserGroupRepository', array('setDefaultQuerySettings'), array($objectManager));
                $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
-               $objectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
                $fixture->expects($this->once())->method('setDefaultQuerySettings')->with($querySettings);
                $fixture->initializeObject();
        }
index 2b4f986..6e4bfea 100644 (file)
@@ -41,7 +41,7 @@ class BackendUserRepositoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa
                $fixture->injectPersistenceManager(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager'));
                $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
                $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
-               $objectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
                $fixture->initializeObject();
        }
 
@@ -53,7 +53,7 @@ class BackendUserRepositoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa
                /** @var $fixture \TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository */
                $fixture = $this->getMock('TYPO3\\CMS\\Extbase\\Domain\\Repository\\BackendUserGroupRepository', array('setDefaultQuerySettings'), array($objectManager));
                $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
-               $objectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
                $fixture->expects($this->once())->method('setDefaultQuerySettings')->with($querySettings);
                $fixture->initializeObject();
        }
index a1290d1..7fccf03 100644 (file)
@@ -53,7 +53,7 @@ class CategoryRepositoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
                $fixture->injectPersistenceManager(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager'));
                $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
                $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
-               $objectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
                $fixture->initializeObject();
        }
 }
index 3240a10..f6f9dda 100644 (file)
@@ -53,7 +53,7 @@ class FileMountRepositoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
                $fixture->injectPersistenceManager(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager'));
                $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
                $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
-               $objectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
+               $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
                $fixture->initializeObject();
        }
 }
index a072313..6150008 100644 (file)
@@ -62,7 +62,7 @@ class ActionControllerTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $mockUriBuilder = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
                $mockUriBuilder->expects($this->once())->method('setRequest')->with($mockRequest);
                $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder')->will($this->returnValue($mockUriBuilder));
+               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder')->will($this->returnValue($mockUriBuilder));
                $mockResponse = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response', array(), array(), '', FALSE);
                $configurationService = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\MvcPropertyMappingConfigurationService');
                /** @var \TYPO3\CMS\Extbase\Mvc\Controller\ActionController|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
@@ -210,7 +210,7 @@ class ActionControllerTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $mockFluidTemplateView->expects($this->once())->method('setControllerContext')->with($mockControllerContext);
                $mockFluidTemplateView->expects($this->once())->method('canRender')->with($mockControllerContext)->will($this->returnValue(TRUE));
                $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface', array(), array(), '', FALSE);
-               $mockObjectManager->expects($this->at(0))->method('create')->with('TYPO3\\CMS\\Fluid\\View\\TemplateView')->will($this->returnValue($mockFluidTemplateView));
+               $mockObjectManager->expects($this->at(0))->method('get')->with('TYPO3\\CMS\\Fluid\\View\\TemplateView')->will($this->returnValue($mockFluidTemplateView));
                $mockController = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController', array('buildControllerContext', 'resolveViewObjectName', 'setViewConfiguration'), array(), '', FALSE);
                $mockController->expects($this->once())->method('resolveViewObjectName')->will($this->returnValue(FALSE));
                $mockController->_set('session', $mockSession);
index cf011cb..f807ba6 100644 (file)
@@ -133,7 +133,7 @@ class ArgumentBehaviorBeforeExtbase14Test extends \TYPO3\CMS\Extbase\Tests\Unit\
                $argument = new \TYPO3\CMS\Extbase\Mvc\Controller\Argument('dummy', 'Text');
                $mockConjunctionValidator = $this->getMock('TYPO3\\CMS\\Extbase\\Validation\\Validator\\ConjunctionValidator');
                $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Validation\\Validator\\ConjunctionValidator')->will($this->returnValue($mockConjunctionValidator));
+               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Validation\\Validator\\ConjunctionValidator')->will($this->returnValue($mockConjunctionValidator));
                $argument->injectObjectManager($mockObjectManager);
                $argument->setNewValidatorConjunction(array());
                $this->assertSame($mockConjunctionValidator, $argument->getValidator());
index c18d47c..a72e6f6 100644 (file)
@@ -68,7 +68,7 @@ class ArgumentsTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
        public function addNewArgumentProvidesFluentInterface() {
                $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array(), array(), '', FALSE);
                $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument')->will($this->returnValue($mockArgument));
+               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument')->will($this->returnValue($mockArgument));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments->injectObjectManager($mockObjectManager);
                $newArgument = $arguments->addNewArgument('someArgument');
@@ -168,7 +168,7 @@ class ArgumentsTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
                $mockArgument->expects($this->any())->method('getName')->will($this->returnValue('dummyName'));
                $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument')->will($this->returnValue($mockArgument));
+               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument')->will($this->returnValue($mockArgument));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments->injectObjectManager($mockObjectManager);
                $addedArgument = $arguments->addNewArgument('dummyName');
@@ -184,7 +184,7 @@ class ArgumentsTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $mockArgument = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', array('getName'), array(), '', FALSE);
                $mockArgument->expects($this->any())->method('getName')->will($this->returnValue('dummyName'));
                $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', 'dummyName', 'Text')->will($this->returnValue($mockArgument));
+               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', 'dummyName', 'Text')->will($this->returnValue($mockArgument));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments->injectObjectManager($mockObjectManager);
                $arguments->addNewArgument('dummyName');
@@ -198,7 +198,7 @@ class ArgumentsTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $mockArgument->expects($this->once())->method('getName')->will($this->returnValue('dummyName'));
                $mockArgument->expects($this->once())->method('setRequired')->with(TRUE);
                $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', 'dummyName', 'Text')->will($this->returnValue($mockArgument));
+               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', 'dummyName', 'Text')->will($this->returnValue($mockArgument));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments->injectObjectManager($mockObjectManager);
                $arguments->addNewArgument('dummyName', 'Text', TRUE);
@@ -213,7 +213,7 @@ class ArgumentsTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $mockArgument->expects($this->once())->method('setRequired')->with(FALSE);
                $mockArgument->expects($this->once())->method('setDefaultValue')->with('someDefaultValue');
                $mockObjectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
-               $mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', 'dummyName', 'Text')->will($this->returnValue($mockArgument));
+               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument', 'dummyName', 'Text')->will($this->returnValue($mockArgument));
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments->injectObjectManager($mockObjectManager);
                $arguments->addNewArgument('dummyName', 'Text', FALSE, 'someDefaultValue');
index f47335f..55fc185 100644 (file)
@@ -291,7 +291,7 @@ class MvcPropertyMappingConfigurationServiceTest extends \TYPO3\CMS\Extbase\Test
 
                $mockArgument->injectPropertyMappingConfiguration($propertyMappingConfiguration);
                $mockArgument->expects($this->any())->method('getName')->will($this->returnValue('foo'));
-               $mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument')->will($this->returnValue($mockArgument));
+               $mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Argument')->will($this->returnValue($mockArgument));
 
                $arguments = new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments();
                $arguments->injectObjectManager($mockObjectManager);
index 60b56e8..232503d 100644 (file)
@@ -91,7 +91,7 @@ class RequestBuilderTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
        protected function injectDependencies() {
                $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
                $this->requestBuilder->injectConfigurationManager($this->mockConfigurationManager);
-               $this->mockObjectManager->expects($this->any())->method('create')->with('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request')->will($this->returnValue($this->mockRequest));
+               $this->mockObjectManager->expects($this->any())->method('get')->with('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request')->will($this->returnValue($this->mockRequest));
                $this->requestBuilder->injectObjectManager($this->mockObjectManager);
                $pluginNamespace = 'tx_' . strtolower(($this->configuration['extensionName'] . '_' . $this->configuration['pluginName']));
                $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue($pluginNamespace));
index 9b1a97b..5060ded 100644 (file)
@@ -99,12 +99,12 @@ class QueryFactoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $this->dataMap->expects($this->any())->method('getRootLevel')->will($this->returnValue($rootLevel));
 
                $query = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface');
-               $this->objectManager->expects($this->at(0))->method('create')
+               $this->objectManager->expects($this->at(0))->method('get')
                        ->with('TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface')
                        ->will($this->returnValue($query));
 
                $querySettings = new \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings();
-               $this->objectManager->expects($this->at(1))->method('create')
+               $this->objectManager->expects($this->at(1))->method('get')
                        ->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QuerySettingsInterface')
                        ->will($this->returnValue($querySettings));
                $query->expects($this->once())->method('setQuerySettings')->with($querySettings);
index bc5d393..f384ac0 100644 (file)
@@ -81,7 +81,7 @@ class QueryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
         */
        public function executeReturnsQueryResultInstanceAndInjectsItself() {
                $queryResult = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QueryResult', array(), array(), '', FALSE);
-               $this->objectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Persistence\\QueryResultInterface', $this->query)->will($this->returnValue($queryResult));
+               $this->objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\QueryResultInterface', $this->query)->will($this->returnValue($queryResult));
                $actualResult = $this->query->execute();
                $this->assertSame($queryResult, $actualResult);
        }
index 1c216a5..cd2a095 100644 (file)
@@ -268,7 +268,7 @@ class PersistentObjectConverterTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTe
                $convertedChildProperties = array(
                        'property1' => 'bar'
                );
-               $this->mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSetters')->will($this->returnValue($object));
+               $this->mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSetters')->will($this->returnValue($object));
                $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSetters', '__construct')->will($this->returnValue(array()));
                $configuration = $this->buildConfiguration(array(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED => TRUE));
                $result = $this->converter->convertFrom($source, 'TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSetters', $convertedChildProperties, $configuration);
@@ -283,7 +283,7 @@ class PersistentObjectConverterTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTe
                $source = array('propertyX' => 'bar');
                $model = new $className();
                $convertedChildProperties = array('property1' => 'bar');
-               $this->mockObjectManager->expects($this->once())->method('create')->with($className)->will($this->returnValue($model));
+               $this->mockObjectManager->expects($this->once())->method('get')->with($className)->will($this->returnValue($model));
                $configuration = $this->buildConfiguration(array(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED => TRUE));
                $reflectionException = new \ReflectionException('Method ' . $className . '::__construct() does not exist');
                $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with($className, '__construct')->will($this->throwException($reflectionException));
@@ -304,7 +304,7 @@ class PersistentObjectConverterTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTe
                $convertedChildProperties = array(
                        'propertyNotExisting' => 'bar'
                );
-               $this->mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSetters')->will($this->returnValue($object));
+               $this->mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSetters')->will($this->returnValue($object));
                $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSetters', '__construct')->will($this->returnValue(array()));
                $configuration = $this->buildConfiguration(array(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED => TRUE));
                $result = $this->converter->convertFrom($source, 'TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSetters', $convertedChildProperties, $configuration);
@@ -324,7 +324,7 @@ class PersistentObjectConverterTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTe
                        'property1' => 'param1',
                        'property2' => 'bar'
                );
-               $this->mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSettersAndConstructor', 'param1')->will($this->returnValue($object));
+               $this->mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSettersAndConstructor', 'param1')->will($this->returnValue($object));
                $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSettersAndConstructor', '__construct')->will($this->returnValue(array(
                        'property1' => array('optional' => FALSE)
                )));
@@ -343,7 +343,7 @@ class PersistentObjectConverterTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTe
                        'propertyX' => 'bar'
                );
                $object = new \TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSettersAndConstructor('param1');
-               $this->mockObjectManager->expects($this->once())->method('create')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSettersAndConstructor', 'thisIsTheDefaultValue')->will($this->returnValue($object));
+               $this->mockObjectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSettersAndConstructor', 'thisIsTheDefaultValue')->will($this->returnValue($object));
                $this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with('TYPO3\\CMS\\Extbase\\Tests\\Fixture\\ClassWithSettersAndConstructor', '__construct')->will($this->returnValue(array(
                        'property1' => array('optional' => TRUE, 'defaultValue' => 'thisIsTheDefaultValue')
                )));