Ejemplo n.º 1
0
 public function testStaticCache()
 {
     $this->insert(1, 200);
     PersonalBest::activateStaticCache();
     $PB = new PersonalBest(1, $this->PDO, true);
     $this->assertEquals(200, $PB->seconds());
     $this->insert(1, 180);
     $this->assertEquals(200, $PB->lookup()->seconds());
     PersonalBest::deactivateStaticCache();
     $this->assertEquals(180, $PB->lookup()->seconds());
 }