Extbase:
authorJochen Rau <j.rau@web.de>
Fri, 8 May 2009 14:27:15 +0000 (14:27 +0000)
committerJochen Rau <j.rau@web.de>
Fri, 8 May 2009 14:27:15 +0000 (14:27 +0000)
* The Request Builder is now aware of the Request Method
* URIHelper translates a Domain Object into an foo[uri]=123 part
* Argument: fixed findObjectByUid()
* AbstractDomainObject now returns TRUE after successful _reconstituteProperty()
* Several Unit Tests added
* Some code clean-up

51 files changed:
typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php
typo3/sysext/extbase/Classes/MVC/Controller/AbstractController.php
typo3/sysext/extbase/Classes/MVC/Controller/Argument.php
typo3/sysext/extbase/Classes/MVC/View/Helper/URIHelper.php
typo3/sysext/extbase/Classes/MVC/Web/RequestBuilder.php
typo3/sysext/extbase/Classes/Persistence/Mapper/ObjectRelationalMapper.php
typo3/sysext/extbase/Classes/Persistence/Repository.php
typo3/sysext/extbase/Classes/Property/Exception/FormatNotSupported.php
typo3/sysext/extbase/Classes/Property/Exception/InvalidDataType.php
typo3/sysext/extbase/Classes/Property/Exception/InvalidFormat.php
typo3/sysext/extbase/Classes/Property/Exception/InvalidProperty.php
typo3/sysext/extbase/Classes/Reflection/Service.php
typo3/sysext/extbase/Classes/Validation/Validator/ChainValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/DateTimeValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/EmailAddressValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/FloatValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/IntegerValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/NotEmptyValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/NumberRangeValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/NumberValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/RawValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/RegularExpressionValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/StringLengthValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/TextValidator.php
typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php
typo3/sysext/extbase/Documentation/Manual/en/_old/AppendixCodingGuidelines.xml
typo3/sysext/extbase/Tests/MVC/Controller/AbstractController_testcase.php
typo3/sysext/extbase/Tests/MVC/Controller/Argument_testcase.php
typo3/sysext/extbase/Tests/Persistence/Fixture/CleanEntity.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Fixture/DirtyEntity.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Fixture/Entity1.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Fixture/Entity2.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Fixture/Entity3.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Fixture/ValueObject1.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Persistence/Repository_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/AlphanumericValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/ChainValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/DateTimeValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/EmailAddressValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/FloatValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/GenericObjectValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/IntegerValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/NotEmptyValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/NumberRangeValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/NumberValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/RawValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/RegularExpressionValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/StringLengthValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/Validator/TextValidator_testcase.php
typo3/sysext/extbase/Tests/Validation/ValidatorResolver_testcase.php
typo3/sysext/extbase/ext_emconf.php

index b3123f8..041a659 100644 (file)
@@ -89,7 +89,9 @@ abstract class Tx_Extbase_DomainObject_AbstractDomainObject implements Tx_Extbas
        public function _reconstituteProperty($propertyName, $value) {
                if (property_exists($this, $propertyName)) {
                        $this->$propertyName = $value;
+                       return TRUE;
                }
+               return FALSE;
        }
        
        /**
@@ -100,11 +102,21 @@ abstract class Tx_Extbase_DomainObject_AbstractDomainObject implements Tx_Extbas
         */
        public function _getProperties() {
                $properties = get_object_vars($this);
-               unset($properties['_cleanProperties']);
+               // unset($properties['_cleanProperties']); // TODO Check this again
                return $properties;
        }
        
        /**
+        * Returns the property value of the given property name
+        *
+        * @return array The propertyName
+        * @internal
+        */
+       public function _getPropertyValue($propertyName) {
+               return $this->$propertyName;
+       }
+       
+       /**
         * Returns TRUE if the object is new (the uid was not set, yet)
         *
         * @return boolean
index e1fae14..cd94b18 100755 (executable)
@@ -162,7 +162,7 @@ abstract class Tx_Extbase_MVC_Controller_AbstractController implements Tx_Extbas
         */
        public function processRequest(Tx_Extbase_MVC_Request $request, Tx_Extbase_MVC_Response $response) {
                if (!$this->canProcessRequest($request)) throw new Tx_Extbase_MVC_Exception_UnsupportedRequestType(get_class($this) . ' does not support requests of type "' . get_class($request) . '". Supported types are: ' . implode(' ', $this->supportedRequestTypes) , 1187701131);
-               
+
                $this->request = $request;
                $this->request->setDispatched(TRUE);
                $this->response = $response;
@@ -209,18 +209,26 @@ abstract class Tx_Extbase_MVC_Controller_AbstractController implements Tx_Extbas
         *
         * @param string $actionName Name of the action to forward to
         * @param string $controllerName Unqualified object name of the controller to forward to. If not specified, the current controller is used.
-        * @param string $extensionKey Key of the extension containing the controller to forward to. If not specified, the current extension is assumed.
+        * @param string $extensionName Name of the extension containing the controller to forward to. If not specified, the current extension is assumed.
+        * @param Tx_Extbase_MVC_Controller_Arguments $arguments Arguments to pass to the target action
+        * @param integer $pageUid Target page uid. If NULL, the current page uid is used
         * @param integer $delay (optional) The delay in seconds. Default is no delay.
         * @param integer $statusCode (optional) The HTTP status code for the redirect. Default is "303 See Other"
-        * @param Tx_Extbase_MVC_Controller_Arguments $arguments Arguments to pass to the target action
         * @return void
         * @throws Tx_Extbase_Exception_UnsupportedRequestType If the request is not a web request
         * @throws Tx_Extbase_Exception_StopAction
         */
-       protected function redirect($actionName, $controllerName = NULL, $extensionName = NULL, array $arguments = NULL, $delay = 0, $statusCode = 303) {
+       protected function redirect($actionName, $controllerName = NULL, $extensionName = NULL, array $arguments = NULL, $pageUid = NULL, $delay = 0, $statusCode = 303) {
                if (!$this->request instanceof Tx_Extbase_MVC_Web_Request) throw new Tx_Extbase_Exception_UnsupportedRequestType('redirect() only supports web requests.', 1220539734);
 
-               $uri = $this->URIHelper->URIFor($actionName, $arguments, $controllerName, $extensionName);
+               if ($controllerName === NULL) {
+                       $controllerName = $this->request->getControllerName();
+               }
+               if ($pageUid === NULL) {
+                       $pageUid = $GLOBALS['TSFE']->id;
+               }
+
+               $uri = $this->URIHelper->URIFor($pageUid, $actionName, $arguments, $controllerName, $extensionName);
                $this->redirectToURI($uri, $delay, $statusCode);
        }
 
index 5f0c907..5ad52df 100644 (file)
@@ -217,9 +217,11 @@ class Tx_Extbase_MVC_Controller_Argument {
         * @return Tx_Extbase_MVC_Controller_Argument Returns $this (used for fluent interface)
         */
        public function setNewValidatorChain(array $objectNames) {
-               $this->validator = $this->objectFactory->create('Tx_Extbase_Validation_Validator_ChainValidator');
+               if ($this->validator === NULL) {
+                       $this->validator = t3lib_div::makeInstance('Tx_Extbase_Validation_Validator_ChainValidator');
+               }
                foreach ($objectNames as $objectName) {
-                       if (!$this->objectManager->isObjectRegistered($objectName)) $objectName = 'Tx_Extbase_Validation_Validator_' . $objectName;
+                       if (!class_exists($objectName)) $objectName = 'Tx_Extbase_Validation_Validator_' . $objectName;
                        $this->validator->addValidator(t3lib_div::makeInstance($objectName));
                }
                return $this;
@@ -239,7 +241,6 @@ class Tx_Extbase_MVC_Controller_Argument {
         * @param mixed $value: The value of this argument
         * @return Tx_Extbase_MVC_Controller_Argument $this
         * @throws Tx_Extbase_MVC_Exception_InvalidArgumentValue if the argument is not a valid object of type $dataType
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function setValue($value) {
                if (is_array($value)) {
@@ -270,14 +271,21 @@ class Tx_Extbase_MVC_Controller_Argument {
         * Finds an object from the repository by searching for its technical UID.
         *
         * @param int $uid The object's uid
-        * @return mixed Either the object matching the uuid or, if none or more than one object was found, FALSE
+        * @return mixed Either the object matching the uid or, if none or more than one object was found, FALSE
         */
        protected function findObjectByUid($uid) {
-               $query = $this->queryFactory->create($this->dataType);
-               $query->matching('uid=' . intval($uid));
-               $objects = $query->execute();
-               if (count($objects) === 1 ) return current($objects);
-               return FALSE;
+               $repositoryClassName = $this->dataType . 'Repository';
+               if (class_exists($repositoryClassName)) {
+                       $repository = t3lib_div::makeInstance($this->dataType . 'Repository');
+                       $object = $repository->findOneByUid($uid);
+               }
+               return $object;
+               // TODO replace code as soon as the query object is available
+               // $query = $this->queryFactory->create($this->dataType);
+               // $query->matching('uid=' . intval($uid));
+               // $objects = $query->execute();
+               // if (count($objects) === 1 ) return current($objects);
+               // return FALSE;
        }
 
        /**
index 49c9edd..c13b6de 100644 (file)
@@ -50,6 +50,13 @@ class Tx_Extbase_MVC_View_Helper_URIHelper extends Tx_Extbase_MVC_View_Helper_Ab
         * @return string the typolink URI
         */
        public function URIFor($pageUid, $actionName = NULL, $arguments = array(), $controllerName = NULL, $extensionName = NULL, $pluginName = NULL, array $options = array(), $pageType = 0) {
+               if (is_array($arguments)) {
+                       foreach ($arguments as $argumentKey => $argumentValue) {
+                               if ($argumentValue instanceof Tx_Extbase_DomainObject_AbstractEntity) {
+                                       $arguments[$argumentKey] = array('uid' => $argumentValue->getUid());
+                               }
+                       }
+               }
                if ($actionName !== NULL) {
                        $arguments['action'] = $actionName;
                }
@@ -96,7 +103,9 @@ class Tx_Extbase_MVC_View_Helper_URIHelper extends Tx_Extbase_MVC_View_Helper_Ab
                        unset($options['additionalParams.']);
                }
                $typolinkConfiguration = t3lib_div::array_merge_recursive_overrule($typolinkConfiguration, $options);
+
                return $this->contentObject->typoLink_URL($typolinkConfiguration);
        }
 }
-?>
\ No newline at end of file
+?>
+
index 3e80341..aa5332a 100755 (executable)
@@ -126,9 +126,20 @@ class Tx_Extbase_MVC_Web_RequestBuilder {
                $request->setControllerActionName($actionName);
                $request->setRequestURI(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'));
                $request->setBaseURI(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
-               // TODO Revise the GParrayMerged method
-               foreach (t3lib_div::GParrayMerged('tx_' . strtolower($this->extensionName) . '_' . strtolower($this->pluginKey)) as $key => $value) {
-                       $request->setArgument($key, $value);
+               $request->setMethod((isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : NULL);
+               $GET = t3lib_div::_GET('tx_' . strtolower($this->extensionName) . '_' . strtolower($this->pluginKey));
+               if (is_array($GET)) {
+                       foreach ($GET as $key => $value) {
+                               $request->setArgument($key, $value);
+                       }
+               }
+               if ($request->getMethod() === 'POST') {
+                       $POST = $_POST;
+                       if (is_array($POST)) {
+                               foreach ($POST as $argumentName => $argumentValue) {
+                                       $request->setArgument($argumentName, $argumentValue);
+                               }
+                       }
                }
                return $request;
        }
index 747b733..b242ad8 100644 (file)
@@ -256,8 +256,10 @@ class Tx_Extbase_Persistence_Mapper_ObjectRelationalMapper implements Tx_Extbase
                        $limit
                        );
 
-               $fieldMap = $this->getFieldMapFromResult($res);
-               $rows = $this->getRowsFromResult($dataMap->getTableName(), $res);
+               if ($res) {
+                       $fieldMap = $this->getFieldMapFromResult($res);
+                       $rows = $this->getRowsFromResult($dataMap->getTableName(), $res);
+               }
 
                $objects = array();
                if (is_array($rows)) {
@@ -456,6 +458,29 @@ class Tx_Extbase_Persistence_Mapper_ObjectRelationalMapper implements Tx_Extbase
                unset($GLOBALS['Extbase']['reconstituteObject']);
                return $object;
        }
+       
+       /**
+        * Replaces the given object by the second object.
+        *
+        * This method will unregister the existing object at the identity map and
+        * register the new object instead. The existing object must therefore
+        * already be registered at the identity map which is the case for all
+        * reconstituted objects.
+        *
+        * The new object will be identified by the uuid which formerly belonged
+        * to the existing object. The existing object looses its uuid.
+        *
+        * @param object $existingObject The existing object
+        * @param object $newObject The new object
+        * @return void
+        */
+       public function replaceObject($existingObject, $newObject) {
+               $existingUID = $existingObject->getUid();
+               if ($existingUID === NULL) throw new Tx_Extbase_Persistence_Exception_UnknownObjectException('The given object is unknown to this persistence backend.', 1238070163);
+
+               $this->identityMap->unregisterObject($existingObject);
+               $this->identityMap->registerObject($newObject, $existingUID);
+       }
 
        /**
         * Create a database entry for all aggregate roots first, then traverse object graph.
@@ -610,7 +635,7 @@ class Tx_Extbase_Persistence_Mapper_ObjectRelationalMapper implements Tx_Extbase
                        $row[$dataMap->getTimestampColumnName()] = time();
                }
                if ($dataMap->hasPidColumn()) {
-                       // FIXME check, if this really works: settings from $this->cObj must be merged into the extension settings in the dispatcher
+                       // FIXME Settings from $this->cObj must be merged into the extension settings in the dispatcher
                        $row['pid'] = !empty($this->cObj->data['pages']) ? $this->cObj->data['pages'] : $GLOBALS['TSFE']->id;
                }
                if ($parentObject instanceof Tx_Extbase_DomainObject_DomainObjectInterface && !empty($parentPropertyName)) {
index 6fae855..ed922be 100644 (file)
@@ -32,7 +32,7 @@ require_once(PATH_tslib . 'class.tslib_content.php');
  * @subpackage extbase
  * @version $ID:$
  */
-abstract class Tx_Extbase_Persistence_Repository implements Tx_Extbase_Persistence_RepositoryInterface, t3lib_Singleton {
+class Tx_Extbase_Persistence_Repository implements Tx_Extbase_Persistence_RepositoryInterface, t3lib_Singleton {
 
        /**
         * Class Name of the aggregate root
@@ -91,6 +91,31 @@ abstract class Tx_Extbase_Persistence_Repository implements Tx_Extbase_Persisten
                if (!($object instanceof $this->aggregateRootClassName)) throw new Tx_Extbase_Persistence_Exception_InvalidClass('The class "' . get_class($object) . '" is not supported by the repository.');
                $this->persistenceSession->registerRemovedObject($object);
        }
+       
+       /**
+        * Replaces an object by another.
+        *
+        * @param object $existingObject The existing object
+        * @param object $newObject The new object
+        */
+       public function replace($existingObject, $newObject) {
+               $uid = $existingObject->getUid();
+               if ($uid !== NULL) {
+                       $this->dataMapper->replaceObject($existingObject, $newObject);
+                       $this->persistenceSession->unregisterReconstitutedObject($existingObject);
+                       $this->persistenceSession->registerReconstitutedObject($newObject);
+
+                       // if ($this->removedObjects->contains($existingObject)) {
+                       //      $this->removedObjects->detach($existingObject);
+                       //      $this->removedObjects->attach($newObject);
+                       // }
+               // } elseif ($this->addedObjects->contains($existingObject)) {
+                       // $this->addedObjects->detach($existingObject);
+                       // $this->addedObjects->attach($newObject);
+               } else {
+                       throw new Tx_Extbase_Persistence_Exception_UnknownObject('The "existing object" is unknown to the persistence backend.', 1238068475);
+               }
+       }
                
        /**
         * Dispatches magic methods (findBy[Property]())
index 592be23..a33cd7f 100644 (file)
@@ -1,42 +1,35 @@
 <?php
-declare(ENCODING = 'utf-8');
-namespace F3\FLOW3\Property\Exception;
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage Property
- * @version $Id: FormatNotSupported.php 1811 2009-01-28 12:04:49Z robert $
- */
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
 
 /**
  * An "Format not supported" Exception
  *
- * @package FLOW3
- * @subpackage Property
- * @version $Id: FormatNotSupported.php 1811 2009-01-28 12:04:49Z robert $
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @package TYPO3
+ * @subpackage extbase
+ * @version $Id: $
  */
-class FormatNotSupported extends \F3\FLOW3\Property\Exception {
+class FormatNotSupported extends Tx_Extbase_Property_Exception {
 
 }
 ?>
\ No newline at end of file
index 4623d0a..97cebec 100644 (file)
@@ -1,42 +1,35 @@
 <?php
-declare(ENCODING = 'utf-8');
-namespace F3\FLOW3\Property\Exception;
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage Property
- * @version $Id: InvalidDataType.php 1811 2009-01-28 12:04:49Z robert $
- */
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
 
 /**
  * An "Invalid Data Type" Exception
  *
- * @package FLOW3
- * @subpackage Property
- * @version $Id: InvalidDataType.php 1811 2009-01-28 12:04:49Z robert $
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @package TYPO3
+ * @subpackage extbase
+ * @version $Id: $
  */
-class InvalidDataType extends \F3\FLOW3\Property\Exception {
+class InvalidDataType extends Tx_Extbase_Property_Exception {
 
 }
 
index a1f7a98..bd9638f 100644 (file)
@@ -1,40 +1,33 @@
 <?php
-declare(ENCODING = 'utf-8');
-namespace F3\FLOW3\Property\Exception;
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage Property
- * @version $Id: InvalidFormat.php 1811 2009-01-28 12:04:49Z robert $
- */
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
 
 /**
  * An "Invalid Format" Exception
  *
- * @package FLOW3
- * @subpackage Property
- * @version $Id: InvalidFormat.php 1811 2009-01-28 12:04:49Z robert $
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @package TYPO3
+ * @subpackage extbase
+ * @version $Id: $
  */
 class InvalidFormat extends \F3\FLOW3\Property\Exception {
 
index b2c28bd..cc88511 100644 (file)
@@ -1,42 +1,35 @@
 <?php
-declare(ENCODING = 'utf-8');
-namespace F3\FLOW3\Property\Exception;
-
-/*                                                                        *
- * This script belongs to the FLOW3 framework.                            *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * @package FLOW3
- * @subpackage Property
- * @version $Id: InvalidProperty.php 1811 2009-01-28 12:04:49Z robert $
- */
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
 
 /**
  * An "Invalid Property" Exception
  *
- * @package FLOW3
- * @subpackage Property
- * @version $Id: InvalidProperty.php 1811 2009-01-28 12:04:49Z robert $
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @package TYPO3
+ * @subpackage extbase
+ * @version $Id: $
  */
-class InvalidProperty extends \F3\FLOW3\Property\Exception {
+class InvalidProperty extends Tx_Extbase_Property_Exception {
 
 }
 
index 78255fe..c67aaea 100644 (file)
@@ -114,7 +114,6 @@ class Tx_Extbase_Reflection_Service implements t3lib_Singleton {
         * @param string $className Name of the class containing the property
         * @param string $propertyName Name of the property to return the tags and values of
         * @return array An array of tags and their values or an empty array of no tags were found
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function getPropertyTagsValues($className, $propertyName) {
                if (!isset($this->reflectedClassNames[$className])) $this->reflectClass($className);
@@ -127,7 +126,6 @@ class Tx_Extbase_Reflection_Service implements t3lib_Singleton {
         *
         * @param string $className Full qualified name of the class to reflect
         * @return void
-        * @author Robert Lemke <robert@typo3.org>
         */
        protected function reflectClass($className) {
                $class = new Tx_Extbase_Reflection_ClassReflection($className);
index 2268796..1a2707d 100644 (file)
@@ -50,7 +50,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator implements Tx_Extbase_Valid
        /**
         * Constructs the validator chain
         *
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function __construct() {
                $this->validators = new Tx_Extbase_Persistence_ObjectStorage();
@@ -63,7 +62,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator implements Tx_Extbase_Valid
         *
         * @param mixed $value The value that should be validated
         * @return boolean TRUE if the value is valid, FALSE if an error occured
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function isValid($value) {
                foreach ($this->validators as $validator) {
@@ -80,7 +78,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator implements Tx_Extbase_Valid
         *
         * @param array $options Not used
         * @return void
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function setOptions(array $options) {
        }
@@ -89,7 +86,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator implements Tx_Extbase_Valid
         * Returns an array of errors which occurred during the last isValid() call.
         *
         * @return array An array of error messages or an empty array if no errors occurred.
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function getErrors() {
                return $this->errors;
@@ -100,7 +96,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator implements Tx_Extbase_Valid
         *
         * @param Tx_Extbase_Validation_Validator_ValidatorInterface $validator The validator that should be added
         * @return void
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function addValidator(Tx_Extbase_Validation_Validator_ValidatorInterface $validator) {
                $this->validators->attach($validator);
@@ -110,7 +105,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator implements Tx_Extbase_Valid
         * Removes the specified validator.
         *
         * @param Tx_Extbase_Validation_Validator_ValidatorInterface $validator The validator to remove
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function removeValidator(Tx_Extbase_Validation_Validator_ValidatorInterface $validator) {
                if (!$this->validators->contains($validator)) throw new Tx_Extbase_Validation_Exception_NoSuchValidator('Cannot remove validator because its not in the chain.', 1207020177);
@@ -121,7 +115,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator implements Tx_Extbase_Valid
         * Returns the number of validators contained in this chain.
         *
         * @return integer The number of validators
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function count() {
                return count($this->validators);
index 35f729f..bb7f254 100644 (file)
@@ -39,7 +39,6 @@ class Tx_Extbase_Validation_Validator_DateTimeValidator extends Tx_Extbase_Valid
         * @param mixed $value The value that should be validated
         * @param array $validationOptions Not used
         * @return boolean TRUE if the value is valid, FALSE if an error occured
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function isValid($value) {
                $this->errors = array();
index 1bb3c52..b3e5b48 100644 (file)
@@ -40,7 +40,6 @@ class Tx_Extbase_Validation_Validator_EmailAddressValidator extends Tx_Extbase_V
         *
         * @param mixed $value The value that should be validated
         * @return boolean TRUE if the value is valid, FALSE if an error occured
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function isValid($value) {
                $this->errors = array();
index 433c1a6..60fcaf2 100644 (file)
@@ -38,7 +38,6 @@ class Tx_Extbase_Validation_Validator_FloatValidator extends Tx_Extbase_Validati
         *
         * @param mixed $value The value that should be validated
         * @return boolean TRUE if the value is valid, FALSE if an error occured
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function isValid($value) {
                $this->errors = array();
index a237584..9aa884d 100644 (file)
@@ -38,7 +38,6 @@ class Tx_Extbase_Validation_Validator_IntegerValidator extends Tx_Extbase_Valida
         *
         * @param mixed $value The value that should be validated
         * @return boolean TRUE if the value is valid, FALSE if an error occured
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function isValid($value) {
                $this->errors = array();
index 9926516..b0b3e5a 100644 (file)
@@ -38,8 +38,6 @@ class Tx_Extbase_Validation_Validator_NotEmptyValidator extends Tx_Extbase_Valid
         *
         * @param mixed $value The value that should be validated
         * @return boolean TRUE if the value is valid, FALSE if an error occured
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function isValid($value) {
                $this->errors = array();
index 95c2d1d..3c609f2 100644 (file)
@@ -40,8 +40,6 @@ class Tx_Extbase_Validation_Validator_NumberRangeValidator extends Tx_Extbase_Va
         * @param mixed $value The value that should be validated
         * @param \F3\FLOW3\Validation\Errors $errors An Errors object which will contain any errors which occurred during validation
         * @return boolean TRUE if the value is within the range, otherwise FALSE
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function isValid($value) {
                $this->errors = array();
index 89e9bc3..f2348a2 100644 (file)
@@ -38,8 +38,6 @@ class Tx_Extbase_Validation_Validator_NumberValidator extends Tx_Extbase_Validat
         *
         * @param mixed $value The value that should be validated
         * @return boolean TRUE if the value is valid, FALSE if an error occured
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function isValid($value) {
                $this->errors = array();
index b4e8602..ca0af58 100644 (file)
@@ -36,7 +36,6 @@ class Tx_Extbase_Validation_Validator_RawValidator implements Tx_Extbase_Validat
         *
         * @param mixed $value The value that should be validated
         * @return boolean TRUE
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function isValid($value) {
                return TRUE;
@@ -47,7 +46,6 @@ class Tx_Extbase_Validation_Validator_RawValidator implements Tx_Extbase_Validat
         *
         * @param array $options Not used
         * @return void
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function setOptions(array $options) {
        }
@@ -56,7 +54,6 @@ class Tx_Extbase_Validation_Validator_RawValidator implements Tx_Extbase_Validat
         * Returns an array of errors which occurred during the last isValid() call.
         *
         * @return array An array of error messages or an empty array if no errors occurred.
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function getErrors() {
                return array();
index c35a97c..c76ff9e 100644 (file)
@@ -41,8 +41,6 @@ class Tx_Extbase_Validation_Validator_RegularExpressionValidator extends Tx_Extb
         *
         * @param mixed $value The value that should be validated
         * @return boolean TRUE if the value is valid, FALSE if an error occured
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function isValid($value) {
                $this->errors = array();
index 061ce0f..dba2c67 100755 (executable)
@@ -42,8 +42,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator extends Tx_Extbase_V
         * @param mixed $value The value that should be validated
         * @return boolean TRUE if the value is valid, FALSE if an error occured
         * @throws Tx_Extbase_Validation_Exception_InvalidSubject
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function isValid($value) {
                $this->errors = array();
index c323c0b..9723a61 100644 (file)
@@ -38,9 +38,6 @@ class Tx_Extbase_Validation_Validator_TextValidator extends Tx_Extbase_Validatio
         *
         * @param mixed $value The value that should be validated
         * @return boolean TRUE if the value is valid, FALSE if an error occured
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        * @author Karsten Dambekalns <karsten@typo3.org>
-        * @author Jochen Rau <jochen.rau@typoplanet.de>
         */
        public function isValid($value) {
                $this->errors = array();
index c1fae6d..bac1a22 100644 (file)
@@ -60,8 +60,6 @@ class Tx_Extbase_Validation_ValidatorResolver {
         * @param string $validatorName Either one of the built-in data types or fully qualified validator class name
         * @param array $validatorOptions Options to be passed to the validator
         * @return Tx_Extbase_Validation_Validator_ValidatorInterface Validator or NULL if none found.
-        * @author Sebastian Kurfürst <sebastian@typo3.org>
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function createValidator($validatorName, array $validatorOptions = array()) {
                $validatorClassName = $this->resolveValidatorObjectName($validatorName);
index 0cffba0..32c29d4 100644 (file)
@@ -157,7 +157,6 @@ namespace F3\Your\Stuff\Here;
  * Returns the name of the currently set context.
  *
  * @return string Name of the current context
- * @author Your Name &lt;your@email.here&gt;
  */
 public function getContextName() {
 »   return $this-&gt;contextName;
@@ -874,7 +873,6 @@ class SomeClass {
  * @version $Id$
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public ↩
       License, version 3 or later
- * @author Your Name &lt;your@email.here&gt;
  */
 interface SomeInterface {
  ...</programlisting>
@@ -940,7 +938,6 @@ protected $title = 'Untitled';</programlisting>
  * @param \F3\FLOW3\Log\LoggerInterface $logger A logger
  * @param string $someString This parameter should contain some string
  * @return void
- * @author Your Name &lt;your@email.here&gt;
  */
 public function __construct(\F3\FLOW3\Log\LoggerInterface $logger, $someString) {
  ...</programlisting>
index 85b674c..72ef70b 100644 (file)
@@ -101,14 +101,14 @@ class Tx_Extbase_MVC_Controller_AbstractController_testcase extends Tx_Extbase_B
                $mockResponse = $this->getMock('Tx_Extbase_MVC_Web_Response');
                
                $mockURIHelper = $this->getMock('Tx_Extbase_MVC_View_Helper_URIHelper');
-               $mockURIHelper->expects($this->once())->method('URIFor')->with('theActionName', $arguments, 'TheControllerName', 'TheExtensionName')->will($this->returnValue('the uri'));
+               $mockURIHelper->expects($this->once())->method('URIFor')->with(123, 'theActionName', $arguments, 'TheControllerName', 'TheExtensionName')->will($this->returnValue('the uri'));
        
                $controller = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_AbstractController'), array('redirectToURI'), array(), '', FALSE);
                $controller->expects($this->once())->method('redirectToURI')->with('the uri');
                $controller->_set('request', $mockRequest);
                $controller->_set('response', $mockResponse);
                $controller->_set('URIHelper', $mockURIHelper);
-               $controller->_call('redirect', 'theActionName', 'TheControllerName', 'TheExtensionName', $arguments);
+               $controller->_call('redirect', 'theActionName', 'TheControllerName', 'TheExtensionName', $arguments, 123);
        }
        
        /**
index 4062294..2c16cd6 100644 (file)
@@ -83,86 +83,67 @@ class Tx_Extbase_MVC_Controller_Argument_testcase extends Tx_Extbase_Base_testca
         * @test
         */
        public function setValueTriesToConvertAnIdentityArrayContainingIdentifiersIntoTheRealObject() {
-               // $this->markTestIncomplete('Not yet fully implemented.');
-               $object = new StdClass();
-       
-               $mockQuery = $this->getMock('Tx_Extbase_Persistence_Query', array(), array(), '', FALSE);
+               $object = new stdClass();
+                       
+               // $mockQuery = $this->getMock('Tx_Extbase_Persistence_Query', array(), array(), '', FALSE);
                # TODO Insert more expectations here
-               $mockQuery->expects($this->once())->method('execute')->will($this->returnValue(array($object)));
+               // $mockQuery->expects($this->once())->method('execute')->will($this->returnValue(array($object)));
        
-               $mockQueryFactory = $this->getMock('Tx_Extbase_Persistence_QueryFactory', array(), array(), '', FALSE);
-               $mockQueryFactory->expects($this->once())->method('create')->with('MyClass')->will($this->returnValue($mockQuery));
+               // $mockQueryFactory = $this->getMock('Tx_Extbase_Persistence_QueryFactory', array(), array(), '', FALSE);
+               // $mockQueryFactory->expects($this->once())->method('create')->with('MyClass')->will($this->returnValue($mockQuery));
        
-               $argument = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_Argument'), array('dummy'), array(), '', FALSE);
+               $argument = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_Argument'), array('findObjectByUid'), array(), '', FALSE);
+               $argument->expects($this->once())->method('findObjectByUid')->with('42')->will($this->returnValue($object));
                $argument->_set('dataType', 'MyClass');
-               $argument->_set('queryFactory', $mockQueryFactory);
+               // $argument->_set('queryFactory', $mockQueryFactory);
                $argument->setValue(array('uid' => '42'));
        
                $this->assertSame($object, $argument->_get('value'));
        }
        
+       /**
+        * @test
+        */
+       public function setValueConvertsAnArrayIntoAFreshObjectWithThePropertiesSetToTheArrayValuesIfDataTypeIsAClassAndNoIdentityInformationIsFoundInTheValue() {
+               eval('class MyClass {}');               
+               $object = new MyClass;
+               
+               $theValue = array('property1' => 'value1', 'property2' => 'value2');
+       
+               $mockPropertyMapper = $this->getMock('Tx_Extbase_Property_Mapper', array('map'), array(), '', FALSE);
+               $mockPropertyMapper->expects($this->once())->method('map')->with(array('property1', 'property2'), $theValue, $object)->will($this->returnValue(TRUE));
+       
+               $argument = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_Argument'), array('dummy'), array(), '', FALSE);
+               $argument->_set('dataType', 'MyClass');
+               $argument->_set('propertyMapper', $mockPropertyMapper);
+               $argument->setValue($theValue);
+       
+               $this->assertTrue($argument->_get('value') instanceof MyClass);
+       }
+               
+       /**
+        * @test
+        */
+       public function toStringReturnsTheStringVersionOfTheArgumentsValue() {
+               $argument = new Tx_Extbase_MVC_Controller_Argument('dummy', 'Text');
+               $argument->setValue(123);
+       
+               $this->assertSame((string)$argument, '123', 'The returned argument is not a string.');
+               $this->assertNotSame((string)$argument, 123, 'The returned argument is identical to the set value.');
+       }
+       
        // /**
        //  * @test
        //  */
-       // public function setValueConvertsAnArrayIntoAFreshObjectWithThePropertiesSetToTheArrayValuesIfDataTypeIsAClassAndNoIdentityInformationIsFoundInTheValue() {
-       //      eval('class MyClass {}');               
-       //      $object = new MyClass;
-       //      
-       //      $theValue = array('property1' => 'value1', 'property2' => 'value2');
-       // 
-       //      $mockPropertyMapper = $this->getMock('Tx_Extbase_Property_Mapper', array('map'), array(), '', FALSE);
-       //      $mockPropertyMapper->expects($this->once())->method('map')->with(array('property1', 'property2'), $theValue, $object)->will($this->returnValue(TRUE));
-       // 
-       //      $argument = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_Argument'), array('dummy'), array(), '', FALSE);
-       //      $argument->_set('dataType', 'MyClass');
-       //      $argument->_set('propertyMapper', $mockPropertyMapper);
-       //      $argument->setValue($theValue);
-       // 
-       //      $this->assertSame($object, $argument->_get('value'));
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Robert Lemke <robert@typo3.org>
-       //  */
-       // public function setShortHelpMessageProvidesFluentInterface() {
-       //      $argument = new \F3\FLOW3\MVC\Controller\Argument('dummy', 'Text');
-       //      $returnedArgument = $argument->setShortHelpMessage('x');
-       //      $this->assertSame($argument, $returnedArgument, 'The returned argument is not the original argument.');
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Robert Lemke <robert@typo3.org>
-       //  */
-       // public function toStringReturnsTheStringVersionOfTheArgumentsValue() {
-       //      $argument = new \F3\FLOW3\MVC\Controller\Argument('dummy', 'Text');
-       //      $argument->setValue(123);
-       // 
-       //      $this->assertSame((string)$argument, '123', 'The returned argument is not a string.');
-       //      $this->assertNotSame((string)$argument, 123, 'The returned argument is identical to the set value.');
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-       //  */
-       // public function dataTypeValidatorCanBeAFullClassName() {
+       // public function dataTypeValidatorCanBeAFullClassName() {     
        //      $this->markTestIncomplete();
+       //      $argument = new Tx_Extbase_MVC_Controller_Argument('SomeArgument', 'Tx_Extbase_Validation_Validator_TextValidator');
        // 
-       //      $this->mockObjectManager->expects($this->once())->method('isObjectRegistered')->with('F3\FLOW3\Validation\Validator\TextValidator')->will($this->returnValue(TRUE));
-       //      $this->mockObjectManager->expects($this->any())->method('getObject')->with('F3\FLOW3\Validation\Validator\TextValidator')->will($this->returnValue($this->getMock('F3\FLOW3\Validation\Validator\TextValidator')));
-       // 
-       //      $argument = new \F3\FLOW3\MVC\Controller\Argument('SomeArgument', 'F3\FLOW3\Validation\Validator\TextValidator');
-       //      $argument->injectObjectManager($this->mockObjectManager);
-       // 
-       //      $this->assertType('F3\FLOW3\Validation\Validator\TextValidator', $argument->getDatatypeValidator(), 'The returned datatype validator is not a text validator as expected.');
+       //      $this->assertType('Tx_Extbase_Validation_Validator_TextValidator', $argument->getDatatypeValidator(), 'The returned datatype validator is not a text validator as expected.');
        // }
        // 
        // /**
        //  * @test
-       //  * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-       //  * @author Robert Lemke <robert@typo3.org>
        //  */
        // public function dataTypeValidatorCanBeAShortName() {
        //      $this->markTestIncomplete();
@@ -170,123 +151,66 @@ class Tx_Extbase_MVC_Controller_Argument_testcase extends Tx_Extbase_Base_testca
        //      $this->mockObjectManager->expects($this->once())->method('isObjectRegistered')->with('F3\FLOW3\Validation\Validator\TextValidator')->will($this->returnValue(TRUE));
        //      $this->mockObjectManager->expects($this->any())->method('getObject')->with('F3\FLOW3\Validation\Validator\TextValidator')->will($this->returnValue($this->getMock('F3\FLOW3\Validation\Validator\TextValidator')));
        // 
-       //      $argument = new \F3\FLOW3\MVC\Controller\Argument('SomeArgument', 'Text');
+       //      $argument = new Tx_Extbase_MVC_Controller_Argument('SomeArgument', 'Text');
        //      $argument->injectObjectManager($this->mockObjectManager);
        // 
        //      $this->assertType('F3\FLOW3\Validation\Validator\TextValidator', $argument->getDatatypeValidator(), 'The returned datatype validator is not a text validator as expected.');
        // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Robert Lemke <robert@typo3.org>
-       //  */
-       // public function defaultDataTypeIsText() {
-       //      $argument = new \F3\FLOW3\MVC\Controller\Argument('SomeArgument');
-       //      $this->assertSame('Text', $argument->getDataType());
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-       //  */
-       // public function setNewValidatorChainCreatesANewValidatorChainObject() {
-       //      $this->mockObjectFactory->expects($this->once())->method('create')->with('F3\FLOW3\Validation\Validator\ChainValidator')->will($this->returnValue($this->getMock('F3\FLOW3\Validation\Validator\ChainValidator')));
-       // 
-       //      $argument = new \F3\FLOW3\MVC\Controller\Argument('dummy', 'Text');
-       //      $argument->injectObjectFactory($this->mockObjectFactory);
-       //      $argument->setNewValidatorChain(array());
-       // 
-       //      $this->assertType('F3\FLOW3\Validation\Validator\ChainValidator', $argument->getValidator(), 'The returned validator is not a chain as expected.');
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Robert Lemke <robert@typo3.org>
-       //  */
-       // public function setNewValidatorChainAddsThePassedValidatorsToTheCreatedValidatorChain() {
-       //      $mockValidator1 = $this->getMock('F3\FLOW3\Validation\Validator\ValidatorInterface');
-       //      $mockValidator2 = $this->getMock('F3\FLOW3\Validation\Validator\ValidatorInterface');
-       // 
-       //      $mockValidatorChain = $this->getMock('F3\FLOW3\Validation\Validator\ChainValidator', array(), array(), '', FALSE);
-       //      $mockValidatorChain->expects($this->at(0))->method('addValidator')->with($mockValidator1);
-       //      $mockValidatorChain->expects($this->at(1))->method('addValidator')->with($mockValidator2);
-       // 
-       //      $this->mockObjectFactory->expects($this->once())->method('create')->with('F3\FLOW3\Validation\Validator\ChainValidator')->will($this->returnValue($mockValidatorChain));
-       // 
-       //      $this->mockObjectManager->expects($this->any())->method('isObjectRegistered')->will($this->returnValue(TRUE));
-       //      $this->mockObjectManager->expects($this->exactly(2))->method('getObject')->will($this->onConsecutiveCalls($mockValidator1, $mockValidator2));
-       // 
-       //      $argument = $this->getMock($this->buildAccessibleProxy('F3\FLOW3\MVC\Controller\Argument'), array('dummy'), array(), '', FALSE);
-       //      $argument->_set('objectManager', $this->mockObjectManager);
-       //      $argument->_set('objectFactory', $this->mockObjectFactory);
-       // 
-       //      $argument->setNewValidatorChain(array('Validator1', 'Validator2'));
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Robert Lemke <robert@typo3.org>
-       //  */
-       // public function setNewValidatorChainCanHandleShortValidatorNames() {
-       //      $mockValidator1 = $this->getMock('F3\FLOW3\Validation\Validator\ValidatorInterface');
-       //      $mockValidator2 = $this->getMock('F3\FLOW3\Validation\Validator\ValidatorInterface');
-       // 
-       //      $mockValidatorChain = $this->getMock('F3\FLOW3\Validation\Validator\ChainValidator', array(), array(), '', FALSE);
-       //      $mockValidatorChain->expects($this->at(0))->method('addValidator')->with($mockValidator1);
-       //      $mockValidatorChain->expects($this->at(1))->method('addValidator')->with($mockValidator2);
-       // 
-       //      $this->mockObjectFactory->expects($this->once())->method('create')->with('F3\FLOW3\Validation\Validator\ChainValidator')->will($this->returnValue($mockValidatorChain));
-       // 
-       //      $this->mockObjectManager->expects($this->any())->method('isObjectRegistered')->will($this->returnValue(FALSE));
-       //      $this->mockObjectManager->expects($this->exactly(2))->method('getObject')->will($this->onConsecutiveCalls($mockValidator1, $mockValidator2));
-       // 
-       //      $argument = $this->getMock($this->buildAccessibleProxy('F3\FLOW3\MVC\Controller\Argument'), array('dummy'), array(), '', FALSE);
-       //      $argument->_set('objectManager', $this->mockObjectManager);
-       //      $argument->_set('objectFactory', $this->mockObjectFactory);
-       // 
-       //      $argument->setNewValidatorChain(array('Validator1', 'Validator2'));
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-       //  */
-       // public function setNewFilterChainCreatesANewFilterChainObject() {
-       //      $this->mockObjectFactory->expects($this->once())->method('create')->with('F3\FLOW3\Validation\Filter\Chain')->will($this->returnValue($this->getMock('F3\FLOW3\Validation\Filter\Chain')));
-       // 
-       //      $argument = new \F3\FLOW3\MVC\Controller\Argument('dummy', 'Text');
-       //      $argument->injectObjectFactory($this->mockObjectFactory);
-       //      $argument->setNewFilterChain(array());
-       // 
-       //      $this->assertType('F3\FLOW3\Validation\Filter\Chain', $argument->getFilter(), 'The returned filter is not a chain as expected.');
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Sebastian Kurfürst <sebastian@typo3.org>
-       //  */
-       // public function settingDefaultValueReallySetsDefaultValue() {
-       //      $argument = new \F3\FLOW3\MVC\Controller\Argument('dummy', 'Text');
-       //      $argument->injectObjectFactory($this->mockObjectFactory);
-       //      $argument->setDefaultValue(42);
-       // 
-       //      $this->assertEquals(42, $argument->getValue(), 'The default value was not stored in the Argument.');
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Robert Lemke <robert@typo3.org>
-       //  */
-       // public function setNewFilterChainAddsThePassedFiltersToTheCreatedFilterChain() {
-       //      $this->markTestIncomplete('Implement this test with a new Filter Resolver');
-       // }
-       // 
-       // /**
-       //  * @test
-       //  * @author Robert Lemke <robert@typo3.org>
-       //  */
-       // public function setNewFilterChainCanHandleShortFilterNames() {
-       //      $this->markTestIncomplete('Implement this test with a new Filter Resolver');
-       // }
+       
+       /**
+        * @test
+        */
+       public function defaultDataTypeIsText() {
+               $argument = new Tx_Extbase_MVC_Controller_Argument('SomeArgument');
+               $this->assertSame('Text', $argument->getDataType());
+       }
+       
+       /**
+        * @test
+        */
+       public function setNewValidatorChainCreatesANewValidatorChainObject() {
+               $argument = new Tx_Extbase_MVC_Controller_Argument('dummy', 'Text');
+               $argument->setNewValidatorChain(array());
+       
+               $this->assertType('Tx_Extbase_Validation_Validator_ChainValidator', $argument->getValidator(), 'The returned validator is not a chain as expected.');
+       }
+       
+       /**
+        * @test
+        */
+       public function setNewValidatorChainAddsThePassedValidatorsToTheCreatedValidatorChain() {
+               eval('class Validator1 implements Tx_Extbase_Validation_Validator_ValidatorInterface {
+                       public function isValid($value) {}
+                       public function setOptions(array $validationOptions) {}
+                       public function getErrors() {}
+               }');
+               eval('class Validator2 implements Tx_Extbase_Validation_Validator_ValidatorInterface {
+                       public function isValid($value) {}
+                       public function setOptions(array $validationOptions) {}
+                       public function getErrors() {}
+               }');
+               
+               $validator1 = new Validator1;
+               $validator2 = new Validator2;
+       
+               $mockValidatorChain = $this->getMock('Tx_Extbase_Validation_Validator_ChainValidator');
+               $mockValidatorChain->expects($this->at(0))->method('addValidator')->with($validator1);
+               $mockValidatorChain->expects($this->at(1))->method('addValidator')->with($validator2);
+               
+               $argument = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_Argument'), array('dummy'), array(), '', FALSE);
+               $argument->_set('validator', $mockValidatorChain);
+               $argument->setNewValidatorChain(array('Validator1', 'Validator2'));
+       }
+       
+       /**
+        * @test
+        */
+       public function settingDefaultValueReallySetsDefaultValue() {
+               $argument = new Tx_Extbase_MVC_Controller_Argument('dummy', 'Text');
+               $argument->setDefaultValue(42);
+       
+               $this->assertEquals(42, $argument->getValue(), 'The default value was not stored in the Argument.');
+       }
+       
 }
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Tests/Persistence/Fixture/CleanEntity.php b/typo3/sysext/extbase/Tests/Persistence/Fixture/CleanEntity.php
new file mode 100644 (file)
index 0000000..2e5e428
--- /dev/null
@@ -0,0 +1,110 @@
+<?php
+declare(ENCODING = 'utf-8');
+namespace F3\FLOW3\Tests\Persistence\Fixture;
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: CleanEntity.php 2047 2009-03-24 23:53:16Z robert $
+ */
+
+/**
+ * A model fixture used for testing the persistence manager
+ *
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: CleanEntity.php 2047 2009-03-24 23:53:16Z robert $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @entity
+ */
+class CleanEntity implements \F3\FLOW3\AOP\ProxyInterface {
+
+       /**
+        * Just a normal string
+        *
+        * @var string
+        */
+       public $someString;
+
+       /**
+        * @var integer
+        */
+       public $someInteger;
+
+       /**
+        * Returns the name of the class this proxy extends.
+        *
+        * @return string Name of the target class
+        */
+       public function FLOW3_AOP_Proxy_getProxyTargetClassName() {
+               return 'F3\FLOW3\Tests\Persistence\Fixture\CleanEntity';
+       }
+
+       /**
+        * Invokes the joinpoint - calls the target methods.
+        *
+        * @param \F3\FLOW3\AOP\JoinPointInterface: The join point
+        * @return mixed Result of the target (ie. original) method
+        */
+       public function FLOW3_AOP_Proxy_invokeJoinPoint(\F3\FLOW3\AOP\JoinPointInterface $joinPoint) {
+
+       }
+
+       /**
+        * Returns the value of an arbitrary property.
+        * The method does not have to check if the property exists.
+        *
+        * @param string $propertyName Name of the property
+        * @return mixed Value of the property
+        */
+       public function FLOW3_AOP_Proxy_getProperty($propertyName) {
+               return $this->$propertyName;
+       }
+
+       /**
+        * Sets the value of an arbitrary property.
+        *
+        * @param string $propertyName Name of the property
+        * @param mixed $propertyValue Value to set
+        * @return void
+        */
+       public function FLOW3_AOP_Proxy_setProperty($propertyName, $propertyValue) {
+
+       }
+
+       /**
+        * Returns TRUE as this is a DirtyEntity
+        *
+        * @return boolean
+        */
+       public function FLOW3_Persistence_isDirty() {
+               return FALSE;
+       }
+
+       /**
+        * Dummy method for mock creation
+        * @return void
+        */
+       public function FLOW3_Persistence_memorizeCleanState() {}
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Tests/Persistence/Fixture/DirtyEntity.php b/typo3/sysext/extbase/Tests/Persistence/Fixture/DirtyEntity.php
new file mode 100644 (file)
index 0000000..90001bb
--- /dev/null
@@ -0,0 +1,110 @@
+<?php
+declare(ENCODING = 'utf-8');
+namespace F3\FLOW3\Tests\Persistence\Fixture;
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: DirtyEntity.php 2047 2009-03-24 23:53:16Z robert $
+ */
+
+/**
+ * A model fixture used for testing the persistence manager
+ *
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: DirtyEntity.php 2047 2009-03-24 23:53:16Z robert $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @entity
+ */
+class DirtyEntity implements \F3\FLOW3\AOP\ProxyInterface {
+
+       /**
+        * Just a normal string
+        *
+        * @var string
+        */
+       public $someString;
+
+       /**
+        * @var integer
+        */
+       public $someInteger;
+
+       /**
+        * Returns the name of the class this proxy extends.
+        *
+        * @return string Name of the target class
+        */
+       public function FLOW3_AOP_Proxy_getProxyTargetClassName() {
+               return 'F3\FLOW3\Tests\Persistence\Fixture\DirtyEntity';
+       }
+
+       /**
+        * Invokes the joinpoint - calls the target methods.
+        *
+        * @param \F3\FLOW3\AOP\JoinPointInterface: The join point
+        * @return mixed Result of the target (ie. original) method
+        */
+       public function FLOW3_AOP_Proxy_invokeJoinPoint(\F3\FLOW3\AOP\JoinPointInterface $joinPoint) {
+
+       }
+
+       /**
+        * Returns the value of an arbitrary property.
+        * The method does not have to check if the property exists.
+        *
+        * @param string $propertyName Name of the property
+        * @return mixed Value of the property
+        */
+       public function FLOW3_AOP_Proxy_getProperty($propertyName) {
+               return $this->$propertyName;
+       }
+
+       /**
+        * Sets the value of an arbitrary property.
+        *
+        * @param string $propertyName Name of the property
+        * @param mixed $propertyValue Value to set
+        * @return void
+        */
+       public function FLOW3_AOP_Proxy_setProperty($propertyName, $propertyValue) {
+
+       }
+
+       /**
+        * Returns TRUE as this is a DirtyEntity
+        *
+        * @return boolean
+        */
+       public function FLOW3_Persistence_isDirty() {
+               return TRUE;
+       }
+
+       /**
+        * Dummy method for mock creation
+        * @return void
+        */
+       public function FLOW3_Persistence_memorizeCleanState() {}
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Tests/Persistence/Fixture/Entity1.php b/typo3/sysext/extbase/Tests/Persistence/Fixture/Entity1.php
new file mode 100644 (file)
index 0000000..b8c47f4
--- /dev/null
@@ -0,0 +1,110 @@
+<?php
+declare(ENCODING = 'utf-8');
+namespace F3\FLOW3\Tests\Persistence\Fixture;
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: Entity1.php 2164 2009-04-16 21:12:16Z k-fish $
+ */
+
+/**
+ * A model fixture which is used for testing the class schema builder
+ *
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: Entity1.php 2164 2009-04-16 21:12:16Z k-fish $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @entity
+ */
+class Entity1 {
+
+       /**
+        * An identifier property
+        *
+        * @var string
+        * @uuid
+        */
+       protected $someIdentifier;
+
+       /**
+        * Just a normal string
+        *
+        * @var string
+        * @identity
+        */
+       protected $someString;
+
+       /**
+        * @var integer
+        */
+       protected $someInteger;
+
+       /**
+        * @var float
+        */
+       protected $someFloat;
+
+       /**
+        * @var \DateTime
+        * @identity
+        */
+       protected $someDate;
+
+       /**
+        * @var \SplObjectStorage
+        * @lazy
+        */
+       protected $someSplObjectStorage;
+
+       /**
+        * A transient string
+        *
+        * @var string
+        * @transient
+        */
+       protected $someTransientString;
+
+       /**
+        * @var boolean
+        */
+       protected $someBoolean;
+
+       /**
+        * Just an empty constructor
+        *
+        */
+       public function __construct() {
+
+       }
+
+       /**
+        * Just a dummy method
+        *
+        * @return void
+        */
+       public function someDummyMethod() {
+
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Tests/Persistence/Fixture/Entity2.php b/typo3/sysext/extbase/Tests/Persistence/Fixture/Entity2.php
new file mode 100644 (file)
index 0000000..a1ca3f1
--- /dev/null
@@ -0,0 +1,106 @@
+<?php
+declare(ENCODING = 'utf-8');
+namespace F3\FLOW3\Tests\Persistence\Fixture;
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: Entity2.php 2047 2009-03-24 23:53:16Z robert $
+ */
+
+/**
+ * A model fixture used for testing the persistence manager
+ *
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: Entity2.php 2047 2009-03-24 23:53:16Z robert $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @entity
+ */
+class Entity2 implements \F3\FLOW3\AOP\ProxyInterface {
+
+       /**
+        * Just a normal string
+        *
+        * @var string
+        */
+       public $someString;
+
+       /**
+        * @var integer
+        */
+       public $someInteger;
+
+       /**
+        * @var \F3\FLOW3\Tests\Persistence\Fixture\Entity3
+        */
+       public $someReference;
+
+       /**
+        * @var array
+        */
+       public $someReferenceArray = array();
+
+       /**
+        * Returns the name of the class this proxy extends.
+        *
+        * @return string Name of the target class
+        */
+       public function FLOW3_AOP_Proxy_getProxyTargetClassName() {
+               return 'F3\FLOW3\Tests\Persistence\Fixture\Entity2';
+       }
+
+       /**
+        * Invokes the joinpoint - calls the target methods.
+        *
+        * @param \F3\FLOW3\AOP\JoinPointInterface: The join point
+        * @return mixed Result of the target (ie. original) method
+        */
+       public function FLOW3_AOP_Proxy_invokeJoinPoint(\F3\FLOW3\AOP\JoinPointInterface $joinPoint) {
+
+       }
+
+       /**
+        * Returns the value of an arbitrary property.
+        * The method does not have to check if the property exists.
+        *
+        * @param string $propertyName Name of the property
+        * @return mixed Value of the property
+        */
+       public function FLOW3_AOP_Proxy_getProperty($propertyName) {
+               return $this->$propertyName;
+       }
+
+       /**
+        * Sets the value of an arbitrary property.
+        *
+        * @param string $propertyName Name of the property
+        * @param mixed $propertyValue Value to set
+        * @return void
+        */
+       public function FLOW3_AOP_Proxy_setProperty($propertyName, $propertyValue) {
+
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Tests/Persistence/Fixture/Entity3.php b/typo3/sysext/extbase/Tests/Persistence/Fixture/Entity3.php
new file mode 100644 (file)
index 0000000..b1432fb
--- /dev/null
@@ -0,0 +1,95 @@
+<?php
+declare(ENCODING = 'utf-8');
+namespace F3\FLOW3\Tests\Persistence\Fixture;
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: Entity3.php 2047 2009-03-24 23:53:16Z robert $
+ */
+
+/**
+ * A model fixture used for testing the persistence manager
+ *
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: Entity3.php 2047 2009-03-24 23:53:16Z robert $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @entity
+ */
+class Entity3 implements \F3\FLOW3\AOP\ProxyInterface {
+
+       /**
+        * Just a normal string
+        *
+        * @var string
+        */
+       public $someString;
+
+       /**
+        * @var integer
+        */
+       public $someInteger;
+
+       /**
+        * Returns the name of the class this proxy extends.
+        *
+        * @return string Name of the target class
+        */
+       public function FLOW3_AOP_Proxy_getProxyTargetClassName() {
+               return 'F3\FLOW3\Tests\Persistence\Fixture\Entity3';
+       }
+
+       /**
+        * Invokes the joinpoint - calls the target methods.
+        *
+        * @param \F3\FLOW3\AOP\JoinPointInterface: The join point
+        * @return mixed Result of the target (ie. original) method
+        */
+       public function FLOW3_AOP_Proxy_invokeJoinPoint(\F3\FLOW3\AOP\JoinPointInterface $joinPoint) {
+
+       }
+
+       /**
+        * Returns the value of an arbitrary property.
+        * The method does not have to check if the property exists.
+        *
+        * @param string $propertyName Name of the property
+        * @return mixed Value of the property
+        */
+       public function FLOW3_AOP_Proxy_getProperty($propertyName) {
+               return $this->$propertyName;
+       }
+
+       /**
+        * Sets the value of an arbitrary property.
+        *
+        * @param string $propertyName Name of the property
+        * @param mixed $propertyValue Value to set
+        * @return void
+        */
+       public function FLOW3_AOP_Proxy_setProperty($propertyName, $propertyValue) {
+
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Tests/Persistence/Fixture/ValueObject1.php b/typo3/sysext/extbase/Tests/Persistence/Fixture/ValueObject1.php
new file mode 100644 (file)
index 0000000..057f304
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+declare(ENCODING = 'utf-8');
+namespace F3\FLOW3\Tests\Persistence\Fixture;
+
+/*                                                                        *
+ * This script belongs to the FLOW3 framework.                            *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: ValueObject1.php 1811 2009-01-28 12:04:49Z robert $
+ */
+
+/**
+ * A model fixture which is used for testing the class schema builder
+ *
+ * @package FLOW3
+ * @subpackage Persistence
+ * @version $Id: ValueObject1.php 1811 2009-01-28 12:04:49Z robert $
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @valueobject
+ */
+class ValueObject1 {
+
+       /**
+        * Some string
+        *
+        * @var string
+        */
+       protected $aString;
+
+       protected $propertyWithoutAnnotation;
+}
+?>
\ No newline at end of file
index af58f7d..145b4a6 100644 (file)
 ***************************************************************/
 
 class Tx_Extbase_Persistence_Repository_testcase extends Tx_Extbase_Base_testcase {
-       public function __construct() {
-               require_once(t3lib_extMgm::extPath('blog_example', 'Classes/Domain/Model/BlogRepository.php'));
-       }
+       
+       // public function test_FindDelegatesToObjectRelationalMapperBuildQueryAndFetch() {
+       //      $repository = new Tx_BlogExample_Domain_Model_BlogRepository();
+       //      $repository->dataMapper = $this->getMock('Tx_Extbase_Persistence_Mapper_ObjectRelationalMapper', array('buildQuery', 'fetch'), array(), '', FALSE);
+       //      $repository->dataMapper->expects($this->once())
+       //              ->method('buildQuery')
+       //              ->with($this->equalTo('Tx_BlogExample_Domain_Model_Blog'), $this->equalTo('foo'))
+       //              ->will($this->returnValue('query'));
+       //      $repository->dataMapper->expects($this->once())
+       //              ->method('fetch')
+       //              ->with($this->equalTo('Tx_BlogExample_Domain_Model_Blog'), $this->equalTo('query'))
+       //              ->will($this->returnValue(array()));
+       //      
+       //      $result = $repository->findByConditions('foo');
+       //      $this->assertEquals(array(), $result);
+       // }
+       // 
+       // public function test_MagicFindByPropertyUsesGenericFind() {
+       //      $repository = $this->getMock('Tx_BlogExample_Domain_Model_BlogRepository', array('findByConditions'), array('Tx_BlogExample_Domain_Model_Blog'));
+       //      $repository->expects($this->once())
+       //              ->method('findByConditions')
+       //              ->with($this->equalTo(array('name' => 'foo')))
+       //              ->will($this->returnValue(array()));
+       //      
+       //      $repository->findByName('foo');
+       // }
+       // 
+       // public function test_MagicFindOneByPropertyUsesGenericFind() {
+       //      $repository = $this->getMock('TX_Blogexample_Domain_Model_BlogRepository', array('findByConditions'), array('Tx_BlogExample_Domain_Model_Blog'));
+       //      $repository->expects($this->once())
+       //              ->method('findByConditions')
+       //              ->with($this->equalTo(array('name' => 'foo')), $this->equalTo(''), $this->equalTo(''), $this->equalTo(1))
+       //              ->will($this->returnValue(array()));
+       //      
+       //      $repository->findOneByName('foo');
+       // }
 
-       public function test_FindDelegatesToObjectRelationalMapperBuildQueryAndFetch() {
-               $repository = new Tx_BlogExample_Domain_Model_BlogRepository();
-               $repository->dataMapper = $this->getMock('Tx_Extbase_Persistence_Mapper_ObjectRelationalMapper', array('buildQuery', 'fetch'), array(), '', FALSE);
-               $repository->dataMapper->expects($this->once())
-                       ->method('buildQuery')
-                       ->with($this->equalTo('Tx_BlogExample_Domain_Model_Blog'), $this->equalTo('foo'))
-                       ->will($this->returnValue('query'));
-               $repository->dataMapper->expects($this->once())
-                       ->method('fetch')
-                       ->with($this->equalTo('Tx_BlogExample_Domain_Model_Blog'), $this->equalTo('query'))
-                       ->will($this->returnValue(array()));
-               
-               $result = $repository->findByConditions('foo');
-               $this->assertEquals(array(), $result);
+       /**
+        * @test
+        */
+       public function abstractRepositoryImplementsRepositoryInterface() {
+               eval('class Tx_Aggregate_Root_Class implements Tx_Extbase_DomainObject_DomainObjectInterface {
+                       public function _reconstituteProperty($propertyName, $value) {}
+                       public function _memorizeCleanState() {}
+                       public function _isDirty() {}
+                       public function _getProperties() {}
+                       public function _getDirtyProperties() {}
+               }');
+               $repository = new Tx_Extbase_Persistence_Repository('Tx_Aggregate_Root_Class');
+               $this->assertTrue($repository instanceof Tx_Extbase_Persistence_RepositoryInterface);
        }
 
-       public function test_MagicFindByPropertyUsesGenericFind() {
-               $repository = $this->getMock('Tx_BlogExample_Domain_Model_BlogRepository', array('findByConditions'), array('Tx_BlogExample_Domain_Model_Blog'));
-               $repository->expects($this->once())
-                       ->method('findByConditions')
-                       ->with($this->equalTo(array('name' => 'foo')))
-                       ->will($this->returnValue(array()));
-               
-               $repository->findByName('foo');
-       }
+       // /**
+       //  * @test
+       //  */
+       // public function addActuallyAddsAnObjectToTheInternalObjectsArray() {
+       //      $someObject = new \stdClass();
+       //      $repository = new Tx_Extbase_Persistence_Repository();
+       //      $repository->add($someObject);
+       // 
+       //      $this->assertTrue($repository->getAddedObjects()->contains($someObject));
+       // }
+       // 
+       // /**
+       //  * @test
+       //  */
+       // public function removeActuallyRemovesAnObjectFromTheInternalObjectsArray() {
+       //      $object1 = new \stdClass();
+       //      $object2 = new \stdClass();
+       //      $object3 = new \stdClass();
+       // 
+       //      $repository = new Tx_Extbase_Persistence_Repository();
+       //      $repository->add($object1);
+       //      $repository->add($object2);
+       //      $repository->add($object3);
+       // 
+       //      $repository->remove($object2);
+       // 
+       //      $this->assertTrue($repository->getAddedObjects()->contains($object1));
+       //      $this->assertFalse($repository->getAddedObjects()->contains($object2));
+       //      $this->assertTrue($repository->getAddedObjects()->contains($object3));
+       // }
+       // 
+       // /**
+       //  * @test
+       //  */
+       // public function removeRemovesTheRightObjectEvenIfItHasBeenModifiedSinceItsAddition() {
+       //      $object1 = new \ArrayObject(array('val' => '1'));
+       //      $object2 = new \ArrayObject(array('val' => '2'));
+       //      $object3 = new \ArrayObject(array('val' => '3'));
+       // 
+       //      $repository = new Tx_Extbase_Persistence_Repository();
+       //      $repository->add($object1);
+       //      $repository->add($object2);
+       //      $repository->add($object3);
+       // 
+       //      $object2['foo'] = 'bar';
+       //      $object3['val'] = '2';
+       // 
+       //      $repository->remove($object2);
+       // 
+       //      $this->assertTrue($repository->getAddedObjects()->contains($object1));
+       //      $this->assertFalse($repository->getAddedObjects()->contains($object2));
+       //      $this->assertTrue($repository->getAddedObjects()->contains($object3));
+       // }
+       // 
+       // /**
+       //  * Make sure we remember the objects that are not currently add()ed
+       //  * but might be in persistent storage.
+       //  *
+       //  * @test
+       //  */
+       // public function removeRetainsObjectForObjectsNotInCurrentSession() {
+       //      $object = new \ArrayObject(array('val' => '1'));
+       //      $repository = new Tx_Extbase_Persistence_Repository();
+       //      $repository->remove($object);
+       // 
+       //      $this->assertTrue($repository->getRemovedObjects()->contains($object));
+       // }
+       // 
+       // /**
+       //  * @test
+       //  */
+       // public function createQueryCallsQueryFactoryWithExpectedType() {
+       //      eval('class Tx_Aggregate_Root_Class implements Tx_Extbase_DomainObject_DomainObjectInterface {
+       //              public function _reconstituteProperty($propertyName, $value) {}
+       //              public function _memorizeCleanState() {}
+       //              public function _isDirty() {}
+       //              public function _getProperties() {}
+       //              public function _getDirtyProperties() {}
+       //      }');
+       //      $fakeRepositoryClassName = 'ExpectedTypeRepository';
+       //      $expectedType = 'ExpectedType';
+       // 
+       //      $mockQueryFactory = $this->getMock('Tx_Extbase_Persistence_QueryFactory');
+       //      $mockQueryFactory->expects($this->once())->method('create')->with($expectedType);
+       // 
+       //      $repository = $this->getMock('Tx_Extbase_Persistence_Repository', array('FLOW3_AOP_Proxy_getProxyTargetClassName'), array('Tx_Aggregate_Root_Class'));
+       //      $repository->expects($this->once())->method('FLOW3_AOP_Proxy_getProxyTargetClassName')->will($this->returnValue($fakeRepositoryClassName));
+       // 
+       //      $repository->createQuery();
+       // }
+       // 
+       // /**
+       //  * @test
+       //  */
+       // public function findAllCreatesQueryAndReturnsResultOfExecuteCall() {
+       //      $expectedResult = array('one', 'two');
+       // 
+       //      $mockQuery = $this->getMock('Tx_Extbase_Persistence_Query');
+       //      $mockQuery->expects($this->once())->method('execute')->will($this->returnValue($expectedResult));
+       // 
+       //      $repository = $this->getMock('Tx_Extbase_Persistence_Repository', array('createQuery'));
+       //      $repository->expects($this->once())->method('createQuery')->will($this->returnValue($mockQuery));
+       // 
+       //      $this->assertSame($expectedResult, $repository->findAll());
+       // }
+       // 
+       // /**
+       //  * @test
+       //  */
+       // public function findByUUIDCreatesQueryAndReturnsResultOfExecuteCall() {
+       //      $fakeUUID = '123-456';
+       // 
+       //      $mockQuery = $this->getMock('Tx_Extbase_Persistence_Query');
+       //      $mockQuery->expects($this->once())->method('withUUID')->with($fakeUUID)->will($this->returnValue('matchCriteria'));
+       //      $mockQuery->expects($this->once())->method('matching')->with('matchCriteria')->will($this->returnValue($mockQuery));
+       //      $mockQuery->expects($this->once())->method('execute')->will($this->returnValue(array('one', 'two')));
+       // 
+       //      $repository = $this->getMock('Tx_Extbase_Persistence_Repository', array('createQuery'));
+       //      $repository->expects($this->once())->method('createQuery')->will($this->returnValue($mockQuery));
+       // 
+       //      $this->assertSame('one', $repository->findByUUID($fakeUUID));
+       // }
+       // 
+       // /**
+       //  * Replacing a reconstituted object (which has a uuid) by a new object
+       //  * will ask the persistence backend to replace them accordingly in the
+       //  * identity map.
+       //  *
+       //  * @test
+       //  * @return void
+       //  */
+       // public function replaceReconstitutedObjectByNewObject() {
+       //      $existingObject = new \stdClass;
+       //      $newObject = new \stdClass;
+       // 
+       //      $mockPersistenceBackend = $this->getMock('F3\FLOW3\Persistence\BackendInterface');
+       //      $mockPersistenceBackend->expects($this->once())->method('getUUIDByObject')->with($existingObject)->will($this->returnValue('86ea8820-19f6-11de-8c30-0800200c9a66'));
+       //      $mockPersistenceBackend->expects($this->once())->method('replaceObject')->with($existingObject, $newObject);
+       // 
+       //      $mockPersistenceSession = $this->getMock('F3\FLOW3\Persistence\Session', array(), array(), '', FALSE);
+       //      $mockPersistenceSession->expects($this->once())->method('unregisterReconstitutedObject')->with($existingObject);
+       //      $mockPersistenceSession->expects($this->once())->method('registerReconstitutedObject')->with($newObject);
+       // 
+       //      $mockPersistenceManager = $this->getMock('F3\FLOW3\Persistence\ManagerInterface');
+       //      $mockPersistenceManager->expects($this->once())->method('getBackend')->will($this->returnValue($mockPersistenceBackend));
+       //      $mockPersistenceManager->expects($this->once())->method('getSession')->will($this->returnValue($mockPersistenceSession));
+       // 
+       //      $repository = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_Persistence_Repository'), array('dummy'));
+       //      $repository->injectPersistenceManager($mockPersistenceManager);
+       //      $repository->replace($existingObject, $newObject);
+       // }
+       // 
+       // /**
+       //  * Replacing a reconstituted object which during this session has been
+       //  * marked for removal (by calling the repository's remove method)
+       //  * additionally registers the "newObject" for removal and removes the
+       //  * "existingObject" from the list of removed objects.
+       //  *
+       //  * @test
+       //  * @return void
+       //  */
+       // public function replaceReconstituedObjectWhichIsMarkedToBeRemoved() {
+       //      $existingObject = new \stdClass;
+       //      $newObject = new \stdClass;
+       // 
+       //      $removedObjects = new \SPLObjectStorage;
+       //      $removedObjects->attach($existingObject);
+       // 
+       //      $mockPersistenceBackend = $this->getMock('F3\FLOW3\Persistence\BackendInterface');
+       //      $mockPersistenceBackend->expects($this->once())->method('getUUIDByObject')->with($existingObject)->will($this->returnValue('86ea8820-19f6-11de-8c30-0800200c9a66'));
+       // 
+       //      $mockPersistenceSession = $this->getMock('F3\FLOW3\Persistence\Session', array(), array(), '', FALSE);
+       //      $mockPersistenceSession->expects($this->once())->method('unregisterReconstitutedObject')->with($existingObject);
+       //      $mockPersistenceSession->expects($this->once())->method('registerReconstitutedObject')->with($newObject);
+       // 
+       //      $mockPersistenceManager = $this->getMock('F3\FLOW3\Persistence\ManagerInterface');
+       //      $mockPersistenceManager->expects($this->once())->method('getBackend')->will($this->returnValue($mockPersistenceBackend));
+       //      $mockPersistenceManager->expects($this->once())->method('getSession')->will($this->returnValue($mockPersistenceSession));
+       // 
+       //      $repository = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_Persistence_Repository'), array('dummy'));
+       //      $repository->injectPersistenceManager($mockPersistenceManager);
+       //      $repository->_set('removedObjects', $removedObjects);
+       //      $repository->replace($existingObject, $newObject);
+       // 
+       //      $this->assertFalse($removedObjects->contains($existingObject));
+       //      $this->assertTrue($removedObjects->contains($newObject));
+       // }
+       // 
+       // /**
+       //  * Replacing a new object which has not yet been persisted by another
+       //  * new object will just replace them in the repository's list of added
+       //  * objects.
+       //  *
+       //  * @test
+       //  * @return void
+       //  */
+       // public function replaceNewObjectByNewObject() {
+       //      $existingObject = new \stdClass;
+       //      $newObject = new \stdClass;
+       // 
+       //      $addedObjects = new \SPLObjectStorage;
+       //      $addedObjects->attach($existingObject);
+       // 
+       //      $mockPersistenceBackend = $this->getMock('F3\FLOW3\Persistence\BackendInterface');
+       //      $mockPersistenceBackend->expects($this->once())->method('getUUIDByObject')->with($existingObject)->will($this->returnValue(NULL));
+       // 
+       //      $mockPersistenceSession = $this->getMock('F3\FLOW3\Persistence\Session', array(), array(), '', FALSE);
+       // 
+       //      $mockPersistenceManager = $this->getMock('F3\FLOW3\Persistence\ManagerInterface');
+       //      $mockPersistenceManager->expects($this->once())->method('getSession')->will($this->returnValue($mockPersistenceSession));
+       //      $mockPersistenceManager->expects($this->once())->method('getBackend')->will($this->returnValue($mockPersistenceBackend));
+       // 
+       //      $repository = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_Persistence_Repository'), array('dummy'));
+       //      $repository->injectPersistenceManager($mockPersistenceManager);
+       //      $repository->_set('addedObjects', $addedObjects);
+       //      $repository->replace($existingObject, $newObject);
+       // 
+       //      $this->assertFalse($addedObjects->contains($existingObject));
+       //      $this->assertTrue($addedObjects->contains($newObject));
+       // }
+       // 
+       // /**
+       //  * @test
+       //  */
+       // public function magicCallMethodAcceptsFindBySomethingCallsAndExecutesAQueryWithThatCriteria() {
+       //      $mockQuery = $this->getMock('Tx_Extbase_Persistence_Query');
+       //      $mockQuery->expects($this->once())->method('equals')->with('foo', 'bar')->will($this->returnValue('matchCriteria'));
+       //      $mockQuery->expects($this->once())->method('matching')->with('matchCriteria')->will($this->returnValue($mockQuery));
+       //      $mockQuery->expects($this->once())->method('execute')->will($this->returnValue(array('baz', 'quux')));
+       // 
+       //      $repository = $this->getMock('Tx_Extbase_Persistence_Repository', array('createQuery'));
+       //      $repository->expects($this->once())->method('createQuery')->will($this->returnValue($mockQuery));
+       // 
+       //      $this->assertSame(array('baz', 'quux'), $repository->findByFoo('bar'));
+       // }
+       // 
+       // /**
+       //  * @test
+       //  */
+       // public function magicCallMethodAcceptsFindOneBySomethingCallsAndExecutesAQueryWithThatCriteria() {
+       //      $mockQuery = $this->getMock('Tx_Extbase_Persistence_Query');
+       //      $mockQuery->expects($this->once())->method('equals')->with('foo', 'bar')->will($this->returnValue('matchCriteria'));
+       //      $mockQuery->expects($this->once())->method('matching')->with('matchCriteria')->will($this->returnValue($mockQuery));
+       //      $mockQuery->expects($this->once())->method('execute')->will($this->returnValue(array('baz', 'quux')));
+       // 
+       //      $repository = $this->getMock('Tx_Extbase_Persistence_Repository', array('createQuery'));
+       //      $repository->expects($this->once())->method('createQuery')->will($this->returnValue($mockQuery));
+       // 
+       //      $this->assertSame('baz', $repository->findOneByFoo('bar'));
+       // }
+       // 
+       // /**
+       //  * @test
+       //  * @expectedException F3\FLOW3\Error\Exception
+       //  */
+       // public function magicCallMethodTriggersAnErrorIfUnknownMethodsAreCalled() {
+       //      $repository = $this->getMock('Tx_Extbase_Persistence_Repository', array('dummy'));
+       //      $repository->__call('foo', array());
+       // }
+       // 
 
-       public function test_MagicFindOneByPropertyUsesGenericFind() {
-               $repository = $this->getMock('TX_Blogexample_Domain_Model_BlogRepository', array('findByConditions'), array('Tx_BlogExample_Domain_Model_Blog'));
-               $repository->expects($this->once())
-                       ->method('findByConditions')
-                       ->with($this->equalTo(array('name' => 'foo')), $this->equalTo(''), $this->equalTo(''), $this->equalTo(1))
-                       ->will($this->returnValue(array()));
-               
-               $repository->findOneByName('foo');
-       }
 }
 ?>
\ No newline at end of file
index fbd0d1a..afb82e0 100755 (executable)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_AlphanumericValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function alphanumericValidatorReturnsTrueForAnAlphanumericString() {
                $alphanumericValidator = new Tx_Extbase_Validation_Validator_AlphanumericValidator();
@@ -42,7 +41,6 @@ class Tx_Extbase_Validation_Validator_AlphanumericValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function alphanumericValidatorReturnsFalseForAStringWithSpecialCharacters() {
        $alphanumericValidator = $this->getMock('Tx_Extbase_Validation_Validator_AlphanumericValidator', array('addError'), array(), '', FALSE);
@@ -51,7 +49,6 @@ class Tx_Extbase_Validation_Validator_AlphanumericValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function alphanumericValidatorCreatesTheCorrectErrorForAnInvalidSubject() {
                $alphanumericValidator = $this->getMock('Tx_Extbase_Validation_Validator_AlphanumericValidator', array('addError'), array(), '', FALSE);
index a7e6d9a..4a3edac 100644 (file)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator_testcase extends Tx_Extbase
 
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function addingValidatorsToAValidatorChainWorks() {
                $proxyClassName = $this->buildAccessibleProxy('Tx_Extbase_Validation_Validator_ChainValidator');
@@ -46,8 +45,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator_testcase extends Tx_Extbase
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function allValidatorsInTheChainAreCalledIfEachOfThemReturnsTrue() {
                $validatorChain = new Tx_Extbase_Validation_Validator_ChainValidator();
@@ -65,7 +62,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator_testcase extends Tx_Extbase
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function validatorChainReturnsTrueIfAllChainedValidatorsReturnTrue() {
                $validatorChain = new Tx_Extbase_Validation_Validator_ChainValidator();
@@ -83,7 +79,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator_testcase extends Tx_Extbase
 
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function validatorChainImmediatelyReturnsFalseIfOneValidatorsReturnFalse() {
                $validatorChain = new Tx_Extbase_Validation_Validator_ChainValidator();
@@ -101,7 +96,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator_testcase extends Tx_Extbase
 
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function removingAValidatorOfTheValidatorChainWorks() {
                $validatorChain = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_Validation_Validator_ChainValidator'), array('dummy'), array(), '', TRUE);
@@ -120,7 +114,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator_testcase extends Tx_Extbase
 
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         * @expectedException Tx_Extbase_Validation_Exception_NoSuchValidator
         */
        public function removingANotExistingValidatorIndexThrowsException() {
@@ -131,7 +124,6 @@ class Tx_Extbase_Validation_Validator_ChainValidator_testcase extends Tx_Extbase
 
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function countReturnesTheNumberOfValidatorsContainedInThechain() {
                $validatorChain = new Tx_Extbase_Validation_Validator_ChainValidator;
index 6467731..20ba2fb 100644 (file)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_DateTimeValidator_testcase extends Tx_Extb
 
        /**
         * @test
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function dateTimeValidatorReturnsTrueForAValidDateTimeObject() {
                $dateTimeValidator = new Tx_Extbase_Validation_Validator_DateTimeValidator();
@@ -42,7 +41,6 @@ class Tx_Extbase_Validation_Validator_DateTimeValidator_testcase extends Tx_Extb
 
        /**
         * @test
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function dateTimeValidatorReturnsFalseForAnInvalidDateTimeObject() {
                $dateTimeValidator = $this->getMock('Tx_Extbase_Validation_Validator_DateTimeValidator', array('addError'), array(), '', FALSE);
index 1b1df2c..64392dc 100755 (executable)
@@ -50,7 +50,6 @@ class Tx_Extbase_Validation_Validator_EmailAddressValidator_testcase extends Tx_
        }
        
        /**
-        * @author Karsten Dambekalns <karsten@typo3.org>
         * @test
         * @dataProvider validAddresses
         */
@@ -65,7 +64,6 @@ class Tx_Extbase_Validation_Validator_EmailAddressValidator_testcase extends Tx_
         * Data provider with invalid email addresses
         *
         * @return array
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function invalidAddresses() {
                return array(
@@ -78,7 +76,6 @@ class Tx_Extbase_Validation_Validator_EmailAddressValidator_testcase extends Tx_
        }
 
        /**
-        * @author Karsten Dambekalns <karsten@typo3.org>
         * @test
         * @dataProvider invalidAddresses
         */
@@ -89,7 +86,6 @@ class Tx_Extbase_Validation_Validator_EmailAddressValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function emailValidatorCreatesTheCorrectErrorForAnInvalidEmailAddress() {
                $emailAddressValidator = $this->getMock('Tx_Extbase_Validation_Validator_EmailAddressValidator', array('addError'), array(), '', FALSE);
index fe4dac0..ada7165 100755 (executable)
@@ -61,7 +61,6 @@ class Tx_Extbase_Validation_Validator_FloatValidator_testcase extends Tx_Extbase
        }
        
        /**
-        * @author Karsten Dambekalns <karsten@typo3.org>
         * @test
         * @dataProvider validFloats
         */
@@ -73,7 +72,6 @@ class Tx_Extbase_Validation_Validator_FloatValidator_testcase extends Tx_Extbase
        }
 
        /**
-        * @author Karsten Dambekalns <karsten@typo3.org>
         * @test
         * @dataProvider invalidFloats
         */
@@ -86,7 +84,6 @@ class Tx_Extbase_Validation_Validator_FloatValidator_testcase extends Tx_Extbase
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function floatValidatorCreatesTheCorrectErrorForAnInvalidSubject() {
                $floatValidator = new Tx_Extbase_Validation_Validator_FloatValidator();
index 6c8600d..b6f1dd0 100644 (file)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_GenericObjectValidator_testcase extends Tx
 
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function isValidReturnsFalseIfTheValueIsNoObject() {
                $validator = $this->getMock('Tx_Extbase_Validation_Validator_GenericObjectValidator', array('addError'), array(), '', FALSE);
@@ -42,7 +41,6 @@ class Tx_Extbase_Validation_Validator_GenericObjectValidator_testcase extends Tx
 
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function isValidChecksAllPropertiesForWhichAPropertyValidatorExists() {
                $mockPropertyValidators = array('foo' => 'validator', 'bar' => 'validator');
index 9b9646f..0a8e86d 100755 (executable)
@@ -59,7 +59,6 @@ class Tx_Extbase_Validation_Validator_IntegerValidator_testcase extends Tx_Extba
        }
        
        /**
-        * @author Karsten Dambekalns <karsten@typo3.org>
         * @test
         * @dataProvider validIntegers
         */
@@ -74,7 +73,6 @@ class Tx_Extbase_Validation_Validator_IntegerValidator_testcase extends Tx_Extba
         * Data provider with invalid email addresses
         *
         * @return array
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function invalidIntegers() {
                return array(
@@ -85,7 +83,6 @@ class Tx_Extbase_Validation_Validator_IntegerValidator_testcase extends Tx_Extba
        }
 
        /**
-        * @author Karsten Dambekalns <karsten@typo3.org>
         * @test
         * @dataProvider invalidIntegers
         */
@@ -98,7 +95,6 @@ class Tx_Extbase_Validation_Validator_IntegerValidator_testcase extends Tx_Extba
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function integerValidatorCreatesTheCorrectErrorForAnInvalidSubject() {
                $integerValidator = $this->getMock('Tx_Extbase_Validation_Validator_IntegerValidator', array('addError'), array(), '', FALSE);
index 9b4d779..6a09585 100755 (executable)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_NotEmptyValidator_testcase extends Tx_Extb
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function notEmptyValidatorReturnsTrueForASimpleString() {
                $notEmptyValidator = new Tx_Extbase_Validation_Validator_NotEmptyValidator();
@@ -42,7 +41,6 @@ class Tx_Extbase_Validation_Validator_NotEmptyValidator_testcase extends Tx_Extb
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function notEmptyValidatorReturnsFalseForAnEmptyString() {
                $notEmptyValidator = $this->getMock('Tx_Extbase_Validation_Validator_NotEmptyValidator', array('addError'), array(), '', FALSE);
@@ -51,7 +49,6 @@ class Tx_Extbase_Validation_Validator_NotEmptyValidator_testcase extends Tx_Extb
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function notEmptyValidatorReturnsFalseForANullValue() {
                $notEmptyValidator = $this->getMock('Tx_Extbase_Validation_Validator_NotEmptyValidator', array('addError'), array(), '', FALSE);
@@ -60,7 +57,6 @@ class Tx_Extbase_Validation_Validator_NotEmptyValidator_testcase extends Tx_Extb
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function notEmptyValidatorCreatesTheCorrectErrorForAnEmptySubject() {
                $notEmptyValidator = $this->getMock('Tx_Extbase_Validation_Validator_NotEmptyValidator', array('addError'), array(), '', FALSE);
@@ -70,7 +66,6 @@ class Tx_Extbase_Validation_Validator_NotEmptyValidator_testcase extends Tx_Extb
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function notEmptyValidatorCreatesTheCorrectErrorForANullValue() {
                $notEmptyValidator = $this->getMock('Tx_Extbase_Validation_Validator_NotEmptyValidator', array('addError'), array(), '', FALSE);
index 88e8566..cd50193 100755 (executable)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_NumberRangeValidator_testcase extends Tx_E
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function numberRangeValidatorReturnsTrueForASimpleIntegerInRange() {
                $numberRangeValidator = new Tx_Extbase_Validation_Validator_NumberRangeValidator();
@@ -44,7 +43,6 @@ class Tx_Extbase_Validation_Validator_NumberRangeValidator_testcase extends Tx_E
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function numberRangeValidatorReturnsFalseForANumberOutOfRange() {
                $numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
@@ -54,7 +52,6 @@ class Tx_Extbase_Validation_Validator_NumberRangeValidator_testcase extends Tx_E
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function numberRangeValidatorReturnsTrueForANumberInReversedRange() {
                $numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
@@ -64,7 +61,6 @@ class Tx_Extbase_Validation_Validator_NumberRangeValidator_testcase extends Tx_E
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function numberRangeValidatorReturnsFalseForAString() {
                $numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
@@ -74,7 +70,6 @@ class Tx_Extbase_Validation_Validator_NumberRangeValidator_testcase extends Tx_E
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function numberRangeValidatorCreatesTheCorrectErrorForANumberOutOfRange() {
                $numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
@@ -85,7 +80,6 @@ class Tx_Extbase_Validation_Validator_NumberRangeValidator_testcase extends Tx_E
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function numberRangeValidatorCreatesTheCorrectErrorForAStringSubject() {
                $numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
index e1b6668..06fa76e 100755 (executable)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_NumberValidator_testcase extends Tx_Extbas
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function numberValidatorReturnsTrueForASimpleInteger() {
                $numberValidator = new Tx_Extbase_Validation_Validator_NumberValidator();
@@ -42,7 +41,6 @@ class Tx_Extbase_Validation_Validator_NumberValidator_testcase extends Tx_Extbas
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function numberValidatorReturnsFalseForAString() {
                $numberValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberValidator', array('addError'), array(), '', FALSE);
@@ -51,7 +49,6 @@ class Tx_Extbase_Validation_Validator_NumberValidator_testcase extends Tx_Extbas
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function numberValidatorCreatesTheCorrectErrorForAnInvalidSubject() {
                $numberValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberValidator', array('addError'), array(), '', FALSE);
index 132b2e4..75d17c0 100644 (file)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_RawValidator_testcase extends Tx_Extbase_B
 
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function theRawValidatorAlwaysReturnsTRUE() {
                $rawValidator = new Tx_Extbase_Validation_Validator_RawValidator();
index ea78cf1..b6a26da 100755 (executable)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_RegularExpressionValidator_testcase extend
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function regularExpressionValidatorMatchesABasicExpressionCorrectly() {
                $regularExpressionValidator = $this->getMock('Tx_Extbase_Validation_Validator_RegularExpressionValidator', array('addError'), array(), '', FALSE);
@@ -45,7 +44,6 @@ class Tx_Extbase_Validation_Validator_RegularExpressionValidator_testcase extend
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function regularExpressionValidatorCreatesTheCorrectErrorIfTheExpressionDidNotMatch() {
                $regularExpressionValidator = $this->getMock('Tx_Extbase_Validation_Validator_RegularExpressionValidator', array('addError'), array(), '', FALSE);
index 71e5ac3..e84aa6d 100644 (file)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stgringLengthValidatorReturnsTrueForAStringShorterThanMaxLengthAndLongerThanMinLength() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -43,7 +42,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorReturnsFalseForAStringShorterThanThanMinLength() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -53,7 +51,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorReturnsFalseForAStringLongerThanThanMaxLength() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -63,7 +60,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorReturnsTrueForAStringLongerThanThanMinLengthAndMaxLengthNotSpecified() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -73,7 +69,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorReturnsTrueForAStringShorterThanThanMaxLengthAndMinLengthNotSpecified() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -83,7 +78,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorReturnsTrueForAStringLengthEqualToMaxLengthAndMinLengthNotSpecified() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -93,7 +87,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorReturnsTrueForAStringLengthEqualToMinLengthAndMaxLengthNotSpecified() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -103,7 +96,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorReturnsTrueIfMinLengthAndMaxLengthAreEqualAndTheGivenStringMatchesThisValue() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -113,7 +105,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorReturnsTrueIfTheStringLengthIsEqualToMaxLength() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -123,7 +114,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorReturnsTrueIfTheStringLengthIsEqualToMinLength() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -134,7 +124,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
        /**
         * @test
         * @expectedException Tx_Extbase_Validation_Exception_InvalidValidationOptions
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorThrowsAnExceptionIfMinLengthIsGreaterThanMaxLength() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -144,7 +133,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorInsertsAnErrorObjectIfValidationFails() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -156,7 +144,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorCanHandleAnObjectWithAToStringMethod() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
@@ -179,7 +166,6 @@ class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_
        /**
         * @test
         * @expectedException Tx_Extbase_Validation_Exception_InvalidSubject
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function stringLengthValidatorThrowsAnExceptionIfTheGivenObjectCanNotBeConvertedToAString() {
                $stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
index 71471cc..0ec0b4f 100755 (executable)
@@ -33,7 +33,6 @@ class Tx_Extbase_Validation_Validator_TextValidator_testcase extends Tx_Extbase_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function textValidatorReturnsTrueForASimpleString() {
                $textValidator = new Tx_Extbase_Validation_Validator_TextValidator();
@@ -42,7 +41,6 @@ class Tx_Extbase_Validation_Validator_TextValidator_testcase extends Tx_Extbase_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function textValidatorReturnsFalseForAStringWithHTML() {
                $textValidator = $this->getMock('Tx_Extbase_Validation_Validator_TextValidator', array('addError'), array(), '', FALSE);
@@ -51,7 +49,6 @@ class Tx_Extbase_Validation_Validator_TextValidator_testcase extends Tx_Extbase_
 
        /**
         * @test
-        * @author Karsten Dambekalns <karsten@typo3.org>
         */
        public function textValidatorReturnsFalseForAStringWithPercentEncodedHTML() {
                $textValidator = $this->getMock('Tx_Extbase_Validation_Validator_TextValidator', array('addError'), array(), '', FALSE);
@@ -60,7 +57,6 @@ class Tx_Extbase_Validation_Validator_TextValidator_testcase extends Tx_Extbase_
 
        /**
         * @test
-        * @author Andreas Förthner <andreas.foerthner@netlogix.de>
         */
        public function textValidatorCreatesTheCorrectErrorIfTheSubjectContainsHTMLEntities() {
                $textValidator = $this->getMock('Tx_Extbase_Validation_Validator_TextValidator', array('addError'), array(), '', FALSE);
index d2c6e52..04d755f 100644 (file)
@@ -45,7 +45,8 @@ class Tx_Extbase_Validation_ValidatorResolver_testcase extends Tx_Extbase_Base_t
        public function resolveValidatorObjectNameReturnsTheGivenArgumentIfAnObjectOfThatNameIsRegistered() {
                eval('class Tx_MyExtension_Validation_Validators_FooValidator {}');
                $validatorResolver = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_Validation_ValidatorResolver'), array('dummy'), array());
-               $this->assertSame('Tx_MyExtension_Validation_Validators_FooValidator', $validatorResolver->_call('resolveValidatorObjectName', 'Tx_MyExtension_Validation_Validators_FooValidator'));
+               $validatorObjectName = $validatorResolver->_call('resolveValidatorObjectName', 'Tx_MyExtension_Validation_Validators_Foo');
+               $this->assertSame('Tx_MyExtension_Validation_Validators_FooValidator', $validatorObjectName);
        }
        
        /**
@@ -87,7 +88,6 @@ class Tx_Extbase_Validation_ValidatorResolver_testcase extends Tx_Extbase_Base_t
        
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function getBaseValidatorCachesTheResultOfTheBuildBaseValidatorChainCalls() {
                $mockChainValidator = $this->getMock('Tx_Extbase_Validation_Validator_ChainValidator', array(), array(), '', FALSE);
@@ -104,7 +104,6 @@ class Tx_Extbase_Validation_ValidatorResolver_testcase extends Tx_Extbase_Base_t
        
        /**
         * @test
-        * @author Robert Lemke <robert@typo3.org>
         */
        public function buildMethodArgumentsValidatorChainsDetectsValidateAnnotationsAndRegistersNewValidatorsForEachArgument() {
                $mockController = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_ActionController'), array('fooAction'), array(), '', FALSE);
index 1890caf..073ba46 100644 (file)
@@ -11,8 +11,8 @@
 ########################################################################
 
 $EM_CONF[$_EXTKEY] = array(
-       'title' => 'MVC Framework for Extensions',
-       'description' => 'A framework to build extensions upon: It\'s based on the MVC framework of FLOW3.',
+       'title' => 'A Framework for Extensions',
+       'description' => 'A framework to build extensions in the style of FLOW3 by now.',
        'category' => 'plugin',
        'author' => 'Jochen Rau',
        'author_email' => 'jochen.rau@typoplanet.de',
@@ -26,23 +26,20 @@ $EM_CONF[$_EXTKEY] = array(
        'uploadfolder' => 0,
        'createDirs' => '',
        'modify_tables' => '',
-       'clearCacheOnLoad' => 1,
-       'lockType' => '',
-       'author_company' => '',
+       'clearCacheOnLoad' => 0,
+       'lockType' => 'system',
+       'author_company' => 'TYPO3 core team',
        'version' => '0.1.0',
        'constraints' => array(
                'depends' => array(
-                       'php' => '5.2.3-0.0.0',
-                       'typo3' => '4.2.0-4.3.99',
-               ),
-               'conflicts' => array(
-               ),
-               'suggests' => array(
+                       'php' => '5.2.0-0.0.0',
+                       'typo3' => '4.3.dev-0.0.0',
                ),
+               'conflicts' => array(),
+               'suggests' => array(),
        ),
+       'suggests' => array(),
        '_md5_values_when_last_written' => '',
-       'suggests' => array(
-       ),
 );
 
 ?>
\ No newline at end of file