Cassandra\SchemaMetadataIntegrationTest::testIteratorUserDefinedFunctions PHP Method

testIteratorUserDefinedFunctions() public method

This test ensures that UDFs are properly handled by the driver.
    public function testIteratorUserDefinedFunctions()
    {
        // Create the UDFs (createUserDefinedAggregate creates both functions)
        $this->createUserDefinedAggregate();
        // Validate the UDFs exists
        $keyspace = $this->session->schema()->keyspace($this->keyspaceName);
        $this->assertCount(2, $keyspace->functions());
        foreach ($keyspace->functions() as $function) {
            if ($function->simpleName() == "user_defined_function") {
                $this->assertUserDefinedFunction();
            } else {
                if ($function->simpleName() == "uda_udf_final") {
                    $this->assertAggregateUserDefinedFunction();
                } else {
                    $this->fail("Invalid Function Name: {$function->simpleName()}");
                }
            }
        }
    }