public function _reconstituteProperty($propertyName, $value) {
if (property_exists($this, $propertyName)) {
$this->$propertyName = $value;
+ return TRUE;
}
+ return FALSE;
}
/**
*/
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)
*
*/
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;
*
* @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);
}
* @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;
* @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)) {
* 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;
}
/**
* @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;
}
unset($options['additionalParams.']);
}
$typolinkConfiguration = t3lib_div::array_merge_recursive_overrule($typolinkConfiguration, $options);
+
return $this->contentObject->typoLink_URL($typolinkConfiguration);
}
}
-?>
\ No newline at end of file
+?>
+
$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;
}
$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)) {
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.
$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)) {
* @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
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]())
<?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
<?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 {
}
<?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 {
<?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 {
}
* @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);
*
* @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);
/**
* Constructs the validator chain
*
- * @author Robert Lemke <robert@typo3.org>
*/
public function __construct() {
$this->validators = new Tx_Extbase_Persistence_ObjectStorage();
*
* @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) {
*
* @param array $options Not used
* @return void
- * @author Robert Lemke <robert@typo3.org>
*/
public function setOptions(array $options) {
}
* 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;
*
* @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);
* 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);
* 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);
* @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();
*
* @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();
*
* @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();
*
* @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();
*
* @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();
* @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();
*
* @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();
*
* @param mixed $value The value that should be validated
* @return boolean TRUE
- * @author Robert Lemke <robert@typo3.org>
*/
public function isValid($value) {
return TRUE;
*
* @param array $options Not used
* @return void
- * @author Robert Lemke <robert@typo3.org>
*/
public function setOptions(array $options) {
}
* 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();
*
* @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();
* @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();
*
* @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();
* @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);
* Returns the name of the currently set context.
*
* @return string Name of the current context
- * @author Your Name <your@email.here>
*/
public function getContextName() {
» return $this->contextName;
* @version $Id$
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public ↩
License, version 3 or later
- * @author Your Name <your@email.here>
*/
interface SomeInterface {
...</programlisting>
* @param \F3\FLOW3\Log\LoggerInterface $logger A logger
* @param string $someString This parameter should contain some string
* @return void
- * @author Your Name <your@email.here>
*/
public function __construct(\F3\FLOW3\Log\LoggerInterface $logger, $someString) {
...</programlisting>
$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);
}
/**
* @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();
// $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
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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
***************************************************************/
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
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function alphanumericValidatorReturnsTrueForAnAlphanumericString() {
$alphanumericValidator = new Tx_Extbase_Validation_Validator_AlphanumericValidator();
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function alphanumericValidatorReturnsFalseForAStringWithSpecialCharacters() {
$alphanumericValidator = $this->getMock('Tx_Extbase_Validation_Validator_AlphanumericValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function alphanumericValidatorCreatesTheCorrectErrorForAnInvalidSubject() {
$alphanumericValidator = $this->getMock('Tx_Extbase_Validation_Validator_AlphanumericValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
*/
public function addingValidatorsToAValidatorChainWorks() {
$proxyClassName = $this->buildAccessibleProxy('Tx_Extbase_Validation_Validator_ChainValidator');
/**
* @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();
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function validatorChainReturnsTrueIfAllChainedValidatorsReturnTrue() {
$validatorChain = new Tx_Extbase_Validation_Validator_ChainValidator();
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
*/
public function validatorChainImmediatelyReturnsFalseIfOneValidatorsReturnFalse() {
$validatorChain = new Tx_Extbase_Validation_Validator_ChainValidator();
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
*/
public function removingAValidatorOfTheValidatorChainWorks() {
$validatorChain = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_Validation_Validator_ChainValidator'), array('dummy'), array(), '', TRUE);
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
* @expectedException Tx_Extbase_Validation_Exception_NoSuchValidator
*/
public function removingANotExistingValidatorIndexThrowsException() {
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
*/
public function countReturnesTheNumberOfValidatorsContainedInThechain() {
$validatorChain = new Tx_Extbase_Validation_Validator_ChainValidator;
/**
* @test
- * @author Karsten Dambekalns <karsten@typo3.org>
*/
public function dateTimeValidatorReturnsTrueForAValidDateTimeObject() {
$dateTimeValidator = new Tx_Extbase_Validation_Validator_DateTimeValidator();
/**
* @test
- * @author Karsten Dambekalns <karsten@typo3.org>
*/
public function dateTimeValidatorReturnsFalseForAnInvalidDateTimeObject() {
$dateTimeValidator = $this->getMock('Tx_Extbase_Validation_Validator_DateTimeValidator', array('addError'), array(), '', FALSE);
}
/**
- * @author Karsten Dambekalns <karsten@typo3.org>
* @test
* @dataProvider validAddresses
*/
* Data provider with invalid email addresses
*
* @return array
- * @author Karsten Dambekalns <karsten@typo3.org>
*/
public function invalidAddresses() {
return array(
}
/**
- * @author Karsten Dambekalns <karsten@typo3.org>
* @test
* @dataProvider invalidAddresses
*/
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function emailValidatorCreatesTheCorrectErrorForAnInvalidEmailAddress() {
$emailAddressValidator = $this->getMock('Tx_Extbase_Validation_Validator_EmailAddressValidator', array('addError'), array(), '', FALSE);
}
/**
- * @author Karsten Dambekalns <karsten@typo3.org>
* @test
* @dataProvider validFloats
*/
}
/**
- * @author Karsten Dambekalns <karsten@typo3.org>
* @test
* @dataProvider invalidFloats
*/
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function floatValidatorCreatesTheCorrectErrorForAnInvalidSubject() {
$floatValidator = new Tx_Extbase_Validation_Validator_FloatValidator();
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
*/
public function isValidReturnsFalseIfTheValueIsNoObject() {
$validator = $this->getMock('Tx_Extbase_Validation_Validator_GenericObjectValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
*/
public function isValidChecksAllPropertiesForWhichAPropertyValidatorExists() {
$mockPropertyValidators = array('foo' => 'validator', 'bar' => 'validator');
}
/**
- * @author Karsten Dambekalns <karsten@typo3.org>
* @test
* @dataProvider validIntegers
*/
* Data provider with invalid email addresses
*
* @return array
- * @author Karsten Dambekalns <karsten@typo3.org>
*/
public function invalidIntegers() {
return array(
}
/**
- * @author Karsten Dambekalns <karsten@typo3.org>
* @test
* @dataProvider invalidIntegers
*/
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function integerValidatorCreatesTheCorrectErrorForAnInvalidSubject() {
$integerValidator = $this->getMock('Tx_Extbase_Validation_Validator_IntegerValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function notEmptyValidatorReturnsTrueForASimpleString() {
$notEmptyValidator = new Tx_Extbase_Validation_Validator_NotEmptyValidator();
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function notEmptyValidatorReturnsFalseForAnEmptyString() {
$notEmptyValidator = $this->getMock('Tx_Extbase_Validation_Validator_NotEmptyValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function notEmptyValidatorReturnsFalseForANullValue() {
$notEmptyValidator = $this->getMock('Tx_Extbase_Validation_Validator_NotEmptyValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function notEmptyValidatorCreatesTheCorrectErrorForAnEmptySubject() {
$notEmptyValidator = $this->getMock('Tx_Extbase_Validation_Validator_NotEmptyValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function notEmptyValidatorCreatesTheCorrectErrorForANullValue() {
$notEmptyValidator = $this->getMock('Tx_Extbase_Validation_Validator_NotEmptyValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function numberRangeValidatorReturnsTrueForASimpleIntegerInRange() {
$numberRangeValidator = new Tx_Extbase_Validation_Validator_NumberRangeValidator();
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function numberRangeValidatorReturnsFalseForANumberOutOfRange() {
$numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function numberRangeValidatorReturnsTrueForANumberInReversedRange() {
$numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function numberRangeValidatorReturnsFalseForAString() {
$numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function numberRangeValidatorCreatesTheCorrectErrorForANumberOutOfRange() {
$numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function numberRangeValidatorCreatesTheCorrectErrorForAStringSubject() {
$numberRangeValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberRangeValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function numberValidatorReturnsTrueForASimpleInteger() {
$numberValidator = new Tx_Extbase_Validation_Validator_NumberValidator();
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function numberValidatorReturnsFalseForAString() {
$numberValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function numberValidatorCreatesTheCorrectErrorForAnInvalidSubject() {
$numberValidator = $this->getMock('Tx_Extbase_Validation_Validator_NumberValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
*/
public function theRawValidatorAlwaysReturnsTRUE() {
$rawValidator = new Tx_Extbase_Validation_Validator_RawValidator();
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function regularExpressionValidatorMatchesABasicExpressionCorrectly() {
$regularExpressionValidator = $this->getMock('Tx_Extbase_Validation_Validator_RegularExpressionValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function regularExpressionValidatorCreatesTheCorrectErrorIfTheExpressionDidNotMatch() {
$regularExpressionValidator = $this->getMock('Tx_Extbase_Validation_Validator_RegularExpressionValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stgringLengthValidatorReturnsTrueForAStringShorterThanMaxLengthAndLongerThanMinLength() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorReturnsFalseForAStringShorterThanThanMinLength() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorReturnsFalseForAStringLongerThanThanMaxLength() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorReturnsTrueForAStringLongerThanThanMinLengthAndMaxLengthNotSpecified() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorReturnsTrueForAStringShorterThanThanMaxLengthAndMinLengthNotSpecified() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorReturnsTrueForAStringLengthEqualToMaxLengthAndMinLengthNotSpecified() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorReturnsTrueForAStringLengthEqualToMinLengthAndMaxLengthNotSpecified() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorReturnsTrueIfMinLengthAndMaxLengthAreEqualAndTheGivenStringMatchesThisValue() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorReturnsTrueIfTheStringLengthIsEqualToMaxLength() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorReturnsTrueIfTheStringLengthIsEqualToMinLength() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @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);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorInsertsAnErrorObjectIfValidationFails() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function stringLengthValidatorCanHandleAnObjectWithAToStringMethod() {
$stringLengthValidator = $this->getMock('Tx_Extbase_Validation_Validator_StringLengthValidator', array('addError'), array(), '', FALSE);
/**
* @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);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function textValidatorReturnsTrueForASimpleString() {
$textValidator = new Tx_Extbase_Validation_Validator_TextValidator();
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function textValidatorReturnsFalseForAStringWithHTML() {
$textValidator = $this->getMock('Tx_Extbase_Validation_Validator_TextValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Karsten Dambekalns <karsten@typo3.org>
*/
public function textValidatorReturnsFalseForAStringWithPercentEncodedHTML() {
$textValidator = $this->getMock('Tx_Extbase_Validation_Validator_TextValidator', array('addError'), array(), '', FALSE);
/**
* @test
- * @author Andreas Förthner <andreas.foerthner@netlogix.de>
*/
public function textValidatorCreatesTheCorrectErrorIfTheSubjectContainsHTMLEntities() {
$textValidator = $this->getMock('Tx_Extbase_Validation_Validator_TextValidator', array('addError'), array(), '', FALSE);
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);
}
/**
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
*/
public function getBaseValidatorCachesTheResultOfTheBuildBaseValidatorChainCalls() {
$mockChainValidator = $this->getMock('Tx_Extbase_Validation_Validator_ChainValidator', array(), array(), '', FALSE);
/**
* @test
- * @author Robert Lemke <robert@typo3.org>
*/
public function buildMethodArgumentsValidatorChainsDetectsValidateAnnotationsAndRegistersNewValidatorsForEachArgument() {
$mockController = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_ActionController'), array('fooAction'), array(), '', FALSE);
########################################################################
$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',
'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