* (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
* All rights reserved
*
+* This class is a backport of the corresponding class of FLOW3.
+* All credits go to the v5 team.
+*
* 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
/**
* Testcase for the string length validator
*
- * @package TYPO3
+ * @package Extbase
* @subpackage extbase
- * @version $Id: $
+ * @version $Id$
*/
-class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_Extbase_Base_testcase {
+class Tx_Extbase_Validation_Validator_StringLengthValidator_testcase extends Tx_Extbase_BaseTestCase {
/**
* @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);