PHP 클래스 eZ\Publish\Core\FieldType\Tests\AuthorTest

상속: extends FieldTypeTest
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel

공개 메소드들

메소드 설명
provideDataForGetName ( ) : array Provides data for the getName() test.
provideInputForFromHash ( ) : array Provide input to fromHash() method.
provideInputForToHash ( ) : array Provide input for the toHash() method.
provideInvalidInputForAcceptValue ( ) : array Data provider for invalid input to acceptValue().
provideValidInputForAcceptValue ( ) : array Data provider for valid input to acceptValue().
testAcceptValueInvalidFormat ( )
testAcceptValueInvalidType ( )
testAcceptValueValidFormat ( )
testAddAuthor ( )
testBuildFieldValueWithParam ( )
testBuildFieldValueWithoutParam ( )
testFieldValueToString ( )
testRemoveAuthors ( )
testSettingsSchema ( )
testValidatorConfigurationSchema ( )

보호된 메소드들

메소드 설명
createFieldTypeUnderTest ( ) : eZ\Publish\SPI\FieldType\FieldType Returns the field type under test.
getEmptyValueExpectation ( ) : Value Returns the empty value expected from the field type.
getSettingsSchemaExpectation ( ) : array Returns the settings schema expected from the field type.
getValidatorConfigurationSchemaExpectation ( ) : array Returns the validator configuration schema expected from the field type.
provideFieldTypeIdentifier ( ) : string Returns the identifier of the field type under test.
setUp ( )
tearDown ( )

메소드 상세

createFieldTypeUnderTest() 보호된 메소드

This method is used by all test cases to retrieve the field type under test. Just create the FieldType instance using mocks from the provided get*Mock() methods and/or custom get*Mock() implementations. You MUST NOT take care for test case wide caching of the field type, just return a new instance from this method!
protected createFieldTypeUnderTest ( ) : eZ\Publish\SPI\FieldType\FieldType
리턴 eZ\Publish\SPI\FieldType\FieldType

getEmptyValueExpectation() 보호된 메소드

Returns the empty value expected from the field type.
protected getEmptyValueExpectation ( ) : Value
리턴 eZ\Publish\Core\FieldType\Author\Value

getSettingsSchemaExpectation() 보호된 메소드

Returns the settings schema expected from the field type.
protected getSettingsSchemaExpectation ( ) : array
리턴 array

getValidatorConfigurationSchemaExpectation() 보호된 메소드

Returns the validator configuration schema expected from the field type.

provideDataForGetName() 공개 메소드

Provides data for the getName() test.
public provideDataForGetName ( ) : array
리턴 array

provideFieldTypeIdentifier() 보호된 메소드

Returns the identifier of the field type under test.
protected provideFieldTypeIdentifier ( ) : string
리턴 string

provideInputForFromHash() 공개 메소드

Returns an array of data provider sets with 2 arguments: 1. The valid input to fromHash(), 2. The expected return value from fromHash(). For example: return array( array( null, null ), array( array( 'path' => 'some/file/here', 'fileName' => 'sindelfingen.jpg', 'fileSize' => 2342, 'downloadCount' => 0, 'mimeType' => 'image/jpeg', ), new BinaryFileValue( array( 'path' => 'some/file/here', 'fileName' => 'sindelfingen.jpg', 'fileSize' => 2342, 'downloadCount' => 0, 'mimeType' => 'image/jpeg', ) ) ), ... );
public provideInputForFromHash ( ) : array
리턴 array

provideInputForToHash() 공개 메소드

Returns an array of data provider sets with 2 arguments: 1. The valid input to toHash(), 2. The expected return value from toHash(). For example: return array( array( null, null ), array( new BinaryFileValue( array( 'path' => 'some/file/here', 'fileName' => 'sindelfingen.jpg', 'fileSize' => 2342, 'downloadCount' => 0, 'mimeType' => 'image/jpeg', ) ), array( 'path' => 'some/file/here', 'fileName' => 'sindelfingen.jpg', 'fileSize' => 2342, 'downloadCount' => 0, 'mimeType' => 'image/jpeg', ) ), ... );
public provideInputForToHash ( ) : array
리턴 array

provideInvalidInputForAcceptValue() 공개 메소드

Returns an array of data provider sets with 2 arguments: 1. The invalid input to acceptValue(), 2. The expected exception type as a string. For example: return array( array( new \stdClass(), 'eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException', ), array( array(), 'eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException', ), ... );

provideValidInputForAcceptValue() 공개 메소드

Returns an array of data provider sets with 2 arguments: 1. The valid input to acceptValue(), 2. The expected return value from acceptValue(). For example: return array( array( null, null ), array( __FILE__, new BinaryFileValue( array( 'path' => __FILE__, 'fileName' => basename( __FILE__ ), 'fileSize' => filesize( __FILE__ ), 'downloadCount' => 0, 'mimeType' => 'text/plain', ) ) ), ... );

setUp() 보호된 메소드

protected setUp ( )

tearDown() 보호된 메소드

protected tearDown ( )

testAcceptValueInvalidFormat() 공개 메소드

testAcceptValueInvalidType() 공개 메소드

testAcceptValueValidFormat() 공개 메소드

testAddAuthor() 공개 메소드

public testAddAuthor ( )

testBuildFieldValueWithParam() 공개 메소드

testBuildFieldValueWithoutParam() 공개 메소드

testFieldValueToString() 공개 메소드

testRemoveAuthors() 공개 메소드

public testRemoveAuthors ( )

testSettingsSchema() 공개 메소드

public testSettingsSchema ( )

testValidatorConfigurationSchema() 공개 메소드