PHP Class ConstraintsTests, Formidable

Author: GrĂ©goire Passault ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: gregwar/formidable

Public Methods

Method Description
setup ( )
testArray ( ) Testing sending an array on a simple value
testArrayNames ( ) Testing that array names works
testCaptcha ( ) Testing captcha constraint
testCaptchaNotReusable ( ) Testing that a captcha can't be reused
testCheckArray ( ) Testing an array of chk[]
testCheckBadType ( ) Testing bad type
testCustomConstraint ( ) Testing custom constraint
testCustomConstraintType ( ) Testing typehinting
testDate ( ) Testing date type
testEscaping ( ) Testing that data are escaped
testFile ( ) Testing file type
testFileImage ( ) Testing the filetype="image"
testFixedMultiple ( ) Testing
testGlobalConstraints ( ) Testing constraints on the whole form
testHidden ( ) Testing hidden field
testMaxLength ( ) Testing maxlength constraint
testMinLength ( ) Testing minlength constraint
testMinMax ( ) Testing min and max
testMinMaxRendered ( ) Testing that min and max are rendered
testMultiCheckBox ( ) Testing a multicheckbox
testMultiple ( ) Testing
testMultipleFiles ( ) Handling multiple files
testMultiradio ( ) Testing multiradio
testOptional ( ) Testing rendering an optional field
testOptionalMultiradio ( ) Testing a multiradio optional
testOptions ( ) Testing sourcing an
testRadios ( ) Testing radios fields
testReadOnly ( ) Testing that we can't change the readonly field
testRegex ( ) Testing the regex constraint
testRequired ( ) Testing rendering a required field
testReset ( ) Testing reseting a form
testSelectMultiple ( ) Testing against a select with multiple field
testSelectOut ( ) Testing posting a value that is not possible for a select
testStep ( ) Testing a stepped input

Private Methods

Method Description
assertAccept ( $form, $data, $files = [] ) Testing that a form accept data
assertRefuse ( $form, $data, $files = [] ) Testing that a form doesn't accept data
getForm ( $file )

Method Details

setup() public method

public setup ( )

testArray() public method

Testing sending an array on a simple value
public testArray ( )

testArrayNames() public method

Testing that array names works
public testArrayNames ( )

testCaptcha() public method

Testing captcha constraint
public testCaptcha ( )

testCaptchaNotReusable() public method

Testing that a captcha can't be reused

testCheckArray() public method

Testing an array of chk[]
public testCheckArray ( )

testCheckBadType() public method

Testing bad type
public testCheckBadType ( )

testCustomConstraint() public method

Testing custom constraint

testCustomConstraintType() public method

Testing typehinting

testDate() public method

Testing date type
public testDate ( )

testEscaping() public method

Testing that data are escaped
public testEscaping ( )

testFile() public method

Testing file type
public testFile ( )

testFileImage() public method

Testing the filetype="image"
public testFileImage ( )

testFixedMultiple() public method

Testing
public testFixedMultiple ( )

testGlobalConstraints() public method

Testing constraints on the whole form

testHidden() public method

Testing hidden field
public testHidden ( )

testMaxLength() public method

Testing maxlength constraint
public testMaxLength ( )

testMinLength() public method

Testing minlength constraint
public testMinLength ( )

testMinMax() public method

Testing min and max
public testMinMax ( )

testMinMaxRendered() public method

Testing that min and max are rendered
public testMinMaxRendered ( )

testMultiCheckBox() public method

Testing a multicheckbox
public testMultiCheckBox ( )

testMultiple() public method

Testing
public testMultiple ( )

testMultipleFiles() public method

Handling multiple files
public testMultipleFiles ( )

testMultiradio() public method

Testing multiradio
public testMultiradio ( )

testOptional() public method

Testing rendering an optional field
public testOptional ( )

testOptionalMultiradio() public method

Testing a multiradio optional

testOptions() public method

Testing sourcing an
public testOptions ( )

testRadios() public method

Testing radios fields
public testRadios ( )

testReadOnly() public method

Testing that we can't change the readonly field
public testReadOnly ( )

testRegex() public method

Testing the regex constraint
public testRegex ( )

testRequired() public method

Testing rendering a required field
public testRequired ( )

testReset() public method

Testing reseting a form
public testReset ( )

testSelectMultiple() public method

Testing against a select with multiple field
public testSelectMultiple ( )

testSelectOut() public method

Testing posting a value that is not possible for a select
public testSelectOut ( )

testStep() public method

Testing a stepped input
public testStep ( )