Cassandra\TimestampIntegrationTest::assert PHP Method

assert() private method

Assert the timestamp for a given key in the table against the value_int.
private assert ( $key, $expectedTimestamp, boolean $isEqual = true )
$key Key to determine `value_int` write time
$expectedTimestamp Expected timestamp
$isEqual boolean True is timestamp retrieved from server should equal $exectedTimestamp; false to assume timestamp is greater than expected
    private function assert($key, $expectedTimestamp, $isEqual = true)
    {
        // Assert the timestamp
        $timestamp = $this->getTimestamp($key);
        if ($isEqual) {
            // Set timestamp via options or using should be equal
            $this->assertEquals($expectedTimestamp, $timestamp);
        } else {
            // Inserted timestamp (server or local) should be > expected
            $this->assertGreaterThan($expectedTimestamp, $timestamp);
        }
    }