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()}");
}
}
}
}