PHP Class Cassandra\UserTypeIntegrationTest

Inheritance: extends CollectionsIntegrationTest
Afficher le fichier Open project: datastax/php-driver Class Usage Examples

Méthodes publiques

Méthode Description
assertAddressValue ( UserTypeValue $address, UserTypeValue $expected = null ) Make assertions on a address user type.
generateAddressValue ( ) : UserTypeValue Generate a valid address user type with values that can be used for testing.
getAddressUserType ( ) : UserTypeValue Get the address user type for assigning values.
getPhoneUserType ( ) : UserTypeValue Get the phone user type for assigning values.
testCompleteUserType ( ) User type using a complete user type value.
testCompositeTypes ( $type, $value ) User types with composite types
testEmpty ( $type, $value ) Bind statement with an empty user type
testFrozenRequired ( ) Frozen decoration required for user type.
testInvalidAddressUserTypeAssignedValue ( ) Invalid value assigned to user type .
testInvalidPhoneUserTypeAssignedValue ( ) Invalid value assigned to user type .
testMultipleComponents ( $type, $value ) User types with multiple components
testNestedTypes ( $type, $value ) User types with nested composite types
testNull ( ) Bind statement with an null user type
testPartial ( ) Partial user type
testPartialUserType ( ) User type using a partial user type value.
testScalarTypes ( $type, $value ) User types using scalar/simple datatypes
testUnavailableUserType ( ) Unavailable user type referenced.
userTypeWithCompositeTypes ( ) Data provider for user types with composite types
userTypeWithMultipleComponents ( ) Data provider for user types with multiple components
userTypeWithMultipleEmptyComponents ( )
userTypeWithNestedTypes ( ) Data provider for user types with nested composite types
userTypeWithScalarTypes ( ) Data provider for user types with scalar types

Méthodes protégées

Méthode Description
setUp ( ) Setup the database for the user type tests.

Private Methods

Méthode Description
insertAddress ( UserTypeValue $address ) : Timeuuid Insert an address into the table.
selectAddress ( Timeuuid $key ) : UserTypeValue Select the address from the table.

Method Details

assertAddressValue() public static méthode

Make assertions on a address user type.
public static assertAddressValue ( UserTypeValue $address, UserTypeValue $expected = null )
$address UserTypeValue Address user type to validate
$expected UserTypeValue Expected address user type value (DEFAULT: self::generateAddressValue())

generateAddressValue() public static méthode

Generate a valid address user type with values that can be used for testing.
public static generateAddressValue ( ) : UserTypeValue
Résultat UserTypeValue Valid address user type for testing

getAddressUserType() public static méthode

Get the address user type for assigning values.
public static getAddressUserType ( ) : UserTypeValue
Résultat UserTypeValue Address user type

getPhoneUserType() public static méthode

Get the phone user type for assigning values.
public static getPhoneUserType ( ) : UserTypeValue
Résultat UserTypeValue Phone user type

setUp() protected méthode

Setup the database for the user type tests.
protected setUp ( )

testCompleteUserType() public méthode

This test will ensure that the PHP driver supports the user types. This test uses a complete user type will all values assigned for the associated user type.

testCompositeTypes() public méthode

This test ensures that user types work with other nested collections and other composite types such as UDTs and tuples.
public testCompositeTypes ( $type, $value )

testEmpty() public méthode

Bind statement with an empty user type
public testEmpty ( $type, $value )

testFrozenRequired() public méthode

This test will ensure that the PHP driver throws an exception when interacting with Cassandra 2.1+ (< 3.0) and the frozen decoration is omitted.
public testFrozenRequired ( )

testInvalidAddressUserTypeAssignedValue() public méthode

This test will ensure that the PHP driver throws and exception when assigning a value to a user type that is not valid for that type.

testInvalidPhoneUserTypeAssignedValue() public méthode

This test will ensure that the PHP driver throws and exception when assigning a value to a user type that is not valid for that type.

testMultipleComponents() public méthode

User types with multiple components
public testMultipleComponents ( $type, $value )

testNestedTypes() public méthode

This test ensures that user types work with other nested collections and other composite types such as UDTs and tuples.
public testNestedTypes ( $type, $value )

testNull() public méthode

Bind statement with an null user type
public testNull ( )

testPartial() public méthode

This test will ensure that partial user types return the correct value.
public testPartial ( )

testPartialUserType() public méthode

This test will ensure that the PHP driver supports the user types. This test uses a partial user type where some values will not be assigned.
public testPartialUserType ( )

testScalarTypes() public méthode

This test will ensure that the PHP driver supports the user types collection with all PHP driver supported scalar/simple datatypes.
public testScalarTypes ( $type, $value )

testUnavailableUserType() public méthode

This test will ensure that the PHP driver throws an exception when referencing a non-existent user type.

userTypeWithCompositeTypes() public méthode

Data provider for user types with composite types

userTypeWithMultipleComponents() public méthode

Data provider for user types with multiple components

userTypeWithMultipleEmptyComponents() public méthode

userTypeWithNestedTypes() public méthode

Data provider for user types with nested composite types

userTypeWithScalarTypes() public méthode

Data provider for user types with scalar types