PHP Class lithium\tests\cases\util\ValidatorTest

Inheritance: extends lithium\test\Unit
Show file Open project: unionofrad/lithium

Public Methods

Method Description
setUp ( )
tearDown ( )
testAddCustomRegexFormats ( ) Tests that new formats can be added to existing regex methods using Validator::add().
testAddCustomRegexMethods ( ) Tests that new methods can be called on Validator by adding rules using Validator::add().
testAlphaNumeric ( ) Tests the the 'alphaNumeric' rule validates correct values.
testBooleanValidation ( )
testCheckAny ( ) Verifies that if validating with _any_, any format for a rule will match. See issue #888 for more information.
testCheckHasErrors ( )
testCheckMultipleHasErrors ( )
testCheckMultipleHasFirstError ( )
testCheckMultipleHasOneError ( )
testCheckMultiplePasses ( )
testCheckPasses ( )
testCheckSkipEmpty ( )
testCheckWithLastRule ( )
testCreditCardValidation ( ) Tests credit card validation for numbers in various vendors' formats.
testCustomMethodDispatching ( ) Tests static method call routing to enable patterns defined in Validator::$_rules to be called as methods.
testCustomWithFormat ( )
testDateValidation ( )
testDecimal ( ) Test basic decimal number validation.
testDecimalWithPlaces ( ) Test decimal validation with precision specified.
testEmailDomainCheckBadMxrr ( )
testEmailDomainCheckGoodMxrr ( ) Tests email address validation, with additional hostname lookup
testEmailValidation ( )
testEvents ( ) Tests that event flags applied to rules only trigger when the corresponding event is passed in the $options parameter of check().
testFieldOption ( )
testInList ( ) Tests 'inList' validation.
testIsInRange ( )
testIsLengthBetweenRule ( ) Tests the the 'lengthBetween' rule validates correct values.
testIsNumericRule ( )
testIsRegex ( ) Tests the regular expression validation for various regex delimiters
testNestedFields ( ) Tests validating nested fields using dot-separated paths.
testNotEmptyRule ( ) Tests that the 'notEmpty' rule validates correct values
testPrefilterMethodAccess ( )
testRegexContainment ( ) Tests that setting the 'contain' rule option to false correctly requires a string to be an exact match of the regex, with no additional characters outside.
testRespondsToMagic ( )
testRespondsToParentCall ( )
testRuleFormatMessageOnly ( )
testStateReset ( ) Tests that the rules state is reset when calling Validator::reset().
testUuid ( ) Tests that valid and invalid UUIDs are properly detected.
testValidationWithContextData ( )

Method Details

setUp() public method

public setUp ( )

tearDown() public method

public tearDown ( )

testAddCustomRegexFormats() public method

Tests that new formats can be added to existing regex methods using Validator::add().

testAddCustomRegexMethods() public method

Tests that new methods can be called on Validator by adding rules using Validator::add().

testAlphaNumeric() public method

Tests the the 'alphaNumeric' rule validates correct values.
public testAlphaNumeric ( )

testBooleanValidation() public method

testCheckAny() public method

Verifies that if validating with _any_, any format for a rule will match. See issue #888 for more information.
public testCheckAny ( )

testCheckHasErrors() public method

public testCheckHasErrors ( )

testCheckMultipleHasErrors() public method

testCheckMultipleHasFirstError() public method

testCheckMultipleHasOneError() public method

testCheckMultiplePasses() public method

testCheckPasses() public method

public testCheckPasses ( )

testCheckSkipEmpty() public method

public testCheckSkipEmpty ( )

testCheckWithLastRule() public method

testCreditCardValidation() public method

Tests credit card validation for numbers in various vendors' formats.

testCustomMethodDispatching() public method

Tests static method call routing to enable patterns defined in Validator::$_rules to be called as methods.

testCustomWithFormat() public method

testDateValidation() public method

public testDateValidation ( )

testDecimal() public method

Test basic decimal number validation.
public testDecimal ( )

testDecimalWithPlaces() public method

Test decimal validation with precision specified.

testEmailDomainCheckBadMxrr() public method

testEmailDomainCheckGoodMxrr() public method

Tests email address validation, with additional hostname lookup

testEmailValidation() public method

public testEmailValidation ( )

testEvents() public method

Tests that event flags applied to rules only trigger when the corresponding event is passed in the $options parameter of check().
public testEvents ( )

testFieldOption() public method

public testFieldOption ( )

testInList() public method

Tests 'inList' validation.
public testInList ( )

testIsInRange() public method

public testIsInRange ( )

testIsLengthBetweenRule() public method

Tests the the 'lengthBetween' rule validates correct values.

testIsNumericRule() public method

public testIsNumericRule ( )

testIsRegex() public method

Tests the regular expression validation for various regex delimiters
public testIsRegex ( )

testNestedFields() public method

Tests validating nested fields using dot-separated paths.
public testNestedFields ( )

testNotEmptyRule() public method

Tests that the 'notEmpty' rule validates correct values
public testNotEmptyRule ( )

testPrefilterMethodAccess() public method

testRegexContainment() public method

Tests that setting the 'contain' rule option to false correctly requires a string to be an exact match of the regex, with no additional characters outside.

testRespondsToMagic() public method

public testRespondsToMagic ( )

testRespondsToParentCall() public method

testRuleFormatMessageOnly() public method

testStateReset() public method

Tests that the rules state is reset when calling Validator::reset().
public testStateReset ( )

testUuid() public method

Tests that valid and invalid UUIDs are properly detected.
public testUuid ( )

testValidationWithContextData() public method