Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 103... Línea 103...
103
        }
103
        }
Línea 104... Línea 104...
104
 
104
 
105
        return $store;
105
        return $store;
Línea 106... Línea 106...
106
    }
106
    }
107
 
107
 
Línea 108... Línea 108...
108
    public function test_has() {
108
    public function test_has(): void {
109
        $store = $this->create_cachestore_redis();
109
        $store = $this->create_cachestore_redis();
110
 
110
 
111
        $this->assertTrue($store->set('foo', 'bar'));
111
        $this->assertTrue($store->set('foo', 'bar'));
Línea 112... Línea 112...
112
        $this->assertTrue($store->has('foo'));
112
        $this->assertTrue($store->has('foo'));
113
        $this->assertFalse($store->has('bat'));
113
        $this->assertFalse($store->has('bat'));
Línea 114... Línea 114...
114
    }
114
    }
115
 
115
 
116
    public function test_has_any() {
116
    public function test_has_any(): void {
117
        $store = $this->create_cachestore_redis();
117
        $store = $this->create_cachestore_redis();
Línea 118... Línea 118...
118
 
118
 
119
        $this->assertTrue($store->set('foo', 'bar'));
119
        $this->assertTrue($store->set('foo', 'bar'));
Línea 120... Línea 120...
120
        $this->assertTrue($store->has_any(array('bat', 'foo')));
120
        $this->assertTrue($store->has_any(array('bat', 'foo')));
121
        $this->assertFalse($store->has_any(array('bat', 'baz')));
121
        $this->assertFalse($store->has_any(array('bat', 'baz')));
122
    }
122
    }
123
 
123
 
124
    public function test_has_all() {
124
    public function test_has_all(): void {
Línea 125... Línea 125...
125
        $store = $this->create_cachestore_redis();
125
        $store = $this->create_cachestore_redis();
126
 
126
 
Línea 127... Línea 127...
127
        $this->assertTrue($store->set('foo', 'bar'));
127
        $this->assertTrue($store->set('foo', 'bar'));
128
        $this->assertTrue($store->set('bat', 'baz'));
128
        $this->assertTrue($store->set('bat', 'baz'));
129
        $this->assertTrue($store->has_all(array('foo', 'bat')));
129
        $this->assertTrue($store->has_all(array('foo', 'bat')));