Cassandra\SchemaMetadataIntegrationTest::testVersion PHP Method

testVersion() public method

This test ensures that schema metadata has a version identifier to quickly determine if one schema is different than another.
public testVersion ( )
    public function testVersion()
    {
        // Ensure the version information is available
        $version = $this->session->schema()->version();
        $this->assertGreaterThan(0, $version);
        // Ensure the version is incremented by forcing a keyspace created event
        $this->createKeyspace("{$this->keyspaceName}_new");
        $this->assertEquals($version + 1, $this->session->schema()->version());
        // Ensure the version is not incremented (no changes occurred)
        $this->assertEquals($version + 1, $this->session->schema()->version());
    }