Пример #1
0
 public function testSetGetGetHits()
 {
     $stats = new Stats();
     $this->assertEquals(0, $stats->getGetHits());
     $stats->setGetHits(1399);
     $this->assertEquals(1399, $stats->getGetHits());
     $this->assertEquals(100, $stats->getGetHitsPercentage());
     $stats->setGetMisses(129);
     $this->assertEquals(91.56, $stats->getGetHitsPercentage());
     $stats->setGetMisses(700);
     $this->assertEquals(66.65000000000001, $stats->getGetHitsPercentage());
 }