Cassandra\SchemaMetadataIntegrationTest::testPrimaryKeyMaterializedViews PHP Method

testPrimaryKeyMaterializedViews() public method

This test ensures that materialized views are properly handled by the driver.
    public function testPrimaryKeyMaterializedViews()
    {
        // Create the tables
        $this->createTablesForMaterializedViews();
        // Create the materialized view
        $this->createPrimaryKeyMaterializedView();
        // Validate the schema metadata (two materialized views should exist now)
        $keyspace = $this->session->schema()->keyspace($this->keyspaceName);
        $this->assertCount(1, $keyspace->materializedViews());
        $table = $keyspace->table("{$this->tableNamePrefix}_2");
        $this->assertCount(1, $table->materializedViews());
        $materializedView = $keyspace->materializedView("primary_key");
        $this->assertMaterializedViewsEqual($materializedView, $table->materializedView("primary_key"));
        $this->assertMaterializedView($materializedView, "primary_key", "{$this->tableNamePrefix}_2", array("value1", "key2", "key1"), array("value1", "key2"), array("key1"));
    }