Cassandra\SchemaMetadataIntegrationTest::testDropUserDefinedAggregates PHP Method

testDropUserDefinedAggregates() public method

This test ensures that UDAs are properly handled by the driver.
    public function testDropUserDefinedAggregates()
    {
        // Create the UDA
        $this->createUserDefinedAggregate();
        // Validate the UDA exists
        $keyspace = $this->session->schema()->keyspace($this->keyspaceName);
        $this->assertCount(1, $keyspace->aggregates());
        $this->assertCount(2, $keyspace->functions());
        $this->assertUserDefinedAggregate();
        // Drop the UDA and validate it no longer exists
        $statement = new SimpleStatement("DROP AGGREGATE user_defined_aggregate");
        $this->session->execute($statement);
        $keyspace = $this->session->schema()->keyspace($this->keyspaceName);
        $this->assertCount(0, $keyspace->aggregates());
        $this->assertEmpty($keyspace->function("user_defined_aggregate"));
        $this->assertCount(2, $keyspace->functions());
    }