Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 49... Línea 49...
49
     * deleting the cache between the prescan and the call to get.
49
     * deleting the cache between the prescan and the call to get.
50
     *
50
     *
51
     * The deleting of cache simulates some other process purging
51
     * The deleting of cache simulates some other process purging
52
     * the cache.
52
     * the cache.
53
     */
53
     */
54
    public function test_cache_get_with_prescan_and_purge() {
54
    public function test_cache_get_with_prescan_and_purge(): void {
55
        global $CFG;
55
        global $CFG;
Línea 56... Línea 56...
56
 
56
 
57
        $definition = cache_definition::load_adhoc(cache_store::MODE_REQUEST, 'cachestore_file', 'phpunit_test');
57
        $definition = cache_definition::load_adhoc(cache_store::MODE_REQUEST, 'cachestore_file', 'phpunit_test');
Línea 99... Línea 99...
99
                ['key' => 'frog', 'value' => 'jump']
99
                ['key' => 'frog', 'value' => 'jump']
100
        ]);
100
        ]);
101
        $this->assertEquals(21, $store->get_last_io_bytes());
101
        $this->assertEquals(21, $store->get_last_io_bytes());
102
    }
102
    }
Línea 103... Línea 103...
103
 
103
 
104
    public function test_lock() {
104
    public function test_lock(): void {
Línea 105... Línea 105...
105
        $store = new \cachestore_file('Test');
105
        $store = new \cachestore_file('Test');
106
 
106
 
107
        $this->assertTrue($store->acquire_lock('lock', '123'));
107
        $this->assertTrue($store->acquire_lock('lock', '123'));