Cassandra\TimestampIntegrationTest::setUp PHP Method

setUp() public method

Create the table and client side timestamp session for the timestamp tests.
public setUp ( )
    public function setUp()
    {
        // Process parent setup steps
        parent::setUp();
        // Create the table
        $query = "CREATE TABLE {$this->tableNamePrefix} (key int PRIMARY KEY, value_int int)";
        $this->session->execute(new SimpleStatement($query));
        // Generate the insert and select queries
        $this->insertQuery = "INSERT INTO {$this->tableNamePrefix} (key, value_int) VALUES (?, ?)";
        $this->selectQuery = "SELECT writeTime(value_int) FROM {$this->tableNamePrefix} WHERE key = ?";
        // Create the connection for client side timestamps
        $cluster = \Cassandra::cluster()->withContactPoints(Integration::IP_ADDRESS)->withTimestampGenerator(new TimestampGenerator\Monotonic())->build();
        $this->clientSideTimestampSession = $cluster->connect($this->keyspaceName);
    }