Cassandra\UserTypeIntegrationTest::testInvalidPhoneUserTypeAssignedValue PHP Method

testInvalidPhoneUserTypeAssignedValue() public method

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.
    public function testInvalidPhoneUserTypeAssignedValue()
    {
        // Create a new table
        $this->session->execute(new SimpleStatement("CREATE TABLE invalidphone (key int PRIMARY KEY, value frozen<phone>)"));
        $invalidValue = $this->generateAddressValue();
        // Bind and insert the invalid phone value
        $values = array(1, $invalidValue);
        $query = "INSERT INTO invalidphone (key, value) VALUES (?, ?)";
        $statement = new SimpleStatement($query);
        $options = new ExecutionOptions(array("arguments" => $values));
        $this->session->execute($statement, $options);
    }