Example #1
0
 public function testEnsureTTLIndex()
 {
     $this->collection->ensureTTLIndex(array('ttlAsc' => 1, 'ttlDesc' => -1), 12000);
     $indexes = $this->collection->getIndexes();
     $this->assertEquals(array('ttlAsc' => 1, 'ttlDesc' => -1), $indexes[1]['key']);
     $this->assertArrayHasKey('expireAfterSeconds', $indexes[1]);
     $this->assertEquals(12000, $indexes[1]['expireAfterSeconds']);
 }