PHP Class eZ\Publish\Core\FieldType\Tests\FileSizeValidatorTest

Inheritance: extends PHPUnit_Framework_TestCas\PHPUnit_Framework_TestCase
Datei anzeigen Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
providerForValidateConstraintsKO ( )
providerForValidateConstraintsOK ( )
providerForValidateKO ( )
providerForValidateOK ( )
testConstraintsInitializeGet ( ) Tests setting and getting constraints.
testConstraintsSetGet ( ) Tests setting and getting constraints.
testConstructor ( ) This test ensure an FileSizeValidator can be created.
testGetBadConstraint ( ) Tests getting a wrong constraint.
testGetConstraintsSchema ( ) Test getting constraints schema.
testInitializeBadConstraint ( ) Tests initializing with a wrong constraint.
testSetBadConstraint ( ) Tests setting a wrong constraint.
testValidateConstraintsCorrectValues ( $constraints ) Tests validation of constraints.
testValidateConstraintsWrongValues ( $constraints, $expectedMessages, $values ) Tests validation of constraints.
testValidateCorrectValues ( integer $size ) Tests validating a correct value.
testValidateWrongValues ( $size, $message, $values ) Tests validating a wrong value.

Protected Methods

Method Description
getBinaryFileValue ( integer $size ) : Value
getMaxFileSize ( ) : integer

Method Details

getBinaryFileValue() protected method

protected getBinaryFileValue ( integer $size ) : Value
$size integer
return eZ\Publish\Core\FieldType\BinaryFile\Value

getMaxFileSize() protected method

protected getMaxFileSize ( ) : integer
return integer

providerForValidateConstraintsKO() public method

providerForValidateConstraintsOK() public method

providerForValidateKO() public method

providerForValidateOK() public method

testConstraintsInitializeGet() public method

Tests setting and getting constraints.

testConstraintsSetGet() public method

Tests setting and getting constraints.

testConstructor() public method

This test ensure an FileSizeValidator can be created.
public testConstructor ( )

testGetBadConstraint() public method

Tests getting a wrong constraint.

testGetConstraintsSchema() public method

Test getting constraints schema.

testInitializeBadConstraint() public method

Tests initializing with a wrong constraint.

testSetBadConstraint() public method

Tests setting a wrong constraint.

testValidateConstraintsCorrectValues() public method

Tests validation of constraints.
public testValidateConstraintsCorrectValues ( $constraints )

testValidateConstraintsWrongValues() public method

Tests validation of constraints.
public testValidateConstraintsWrongValues ( $constraints, $expectedMessages, $values )

testValidateCorrectValues() public method

Tests validating a correct value.
public testValidateCorrectValues ( integer $size )
$size integer

testValidateWrongValues() public method

Tests validating a wrong value.
public testValidateWrongValues ( $size, $message, $values )