Esempio n. 1
0
 public function testLocalGetMultipleOptimizeOnEmpty()
 {
     $ephemeral = new Matryoshka\Ephemeral();
     $stats = new Matryoshka\Stats($ephemeral);
     $cache = new TestLocal($stats);
     list($key, $value) = $this->getRandomKeyValue();
     $ephemeral->set($key, $value);
     list($found, $missing) = $cache->getMultiple([$key => 'key']);
     $getMultiCount = $stats->getStats()['getMultiple_count'];
     list($found, $missing) = $cache->getMultiple([$key => 'key']);
     // Assert that "Local" cache hits don't end up querying the underlying backend at all
     $this->assertSame($getMultiCount, $stats->getStats()['getMultiple_count']);
 }
Esempio n. 2
0
    }
    /* one or more test functions - name must start with test */
    function testSomething()
    {
        $this->assertResponse(200);
        $this->assertNoText('<table>');
        $this->assertText('Local Instructions');
        $this->assertText('Plant Name');
        $this->assertText('Water Amount');
        $this->assertText('Sun Level');
        $this->assertText('Sun Duration');
        $this->assertText('Sun xDay');
        $this->assertText('Sun xWeek');
        $this->assertText('Food Type');
        $this->assertText('Food Amount');
        $this->assertText('Food xWeek');
        $this->assertText('Food xMonth');
        $this->assertText('Groom Type');
        $this->assertText('Groom Detail');
        $this->assertText('Groom xMonth');
        $this->assertText('Organic Name');
        $this->assertText('Organic Amount');
        $this->assertText('Organic xWeek');
        $this->assertText('Organic xMonth');
        $this->assertText('Pesticide Type');
        $this->assertText('Pesticide Amount');
        $this->assertText('Pesticide xMonth');
    }
}
$test = new TestLocal();
$test->run(new HtmlReporter());