Cassandra\SchemaMetadataIntegrationTest::testDropUserDefinedFunctions PHP Method

testDropUserDefinedFunctions() public method

This test ensures that UDFs are properly handled by the driver.
    public function testDropUserDefinedFunctions()
    {
        // Create the UDF
        $this->createUserDefinedFunction();
        // Validate the UDF exists
        $keyspace = $this->session->schema()->keyspace($this->keyspaceName);
        $this->assertCount(1, $keyspace->functions());
        $this->assertUserDefinedFunction();
        // Drop the UDF and validate it no longer exists
        $statement = new SimpleStatement("DROP FUNCTION user_defined_function");
        $this->session->execute($statement);
        $keyspace = $this->session->schema()->keyspace($this->keyspaceName);
        $this->assertCount(0, $keyspace->functions());
        $this->assertEmpty($keyspace->function("user_defined_function"));
    }