Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 14... Línea 14...
14
// You should have received a copy of the GNU General Public License
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea 16...
16
 
16
 
Línea 17... Línea -...
17
namespace cachestore_redis;
-
 
18
 
-
 
19
use cache_definition;
17
namespace cachestore_redis;
-
 
18
 
-
 
19
use cachestore_redis;
Línea 20... Línea 20...
20
use cache_store;
20
use core_cache\definition;
Línea 21... Línea 21...
21
use cachestore_redis;
21
use core_cache\store;
22
 
22
 
Línea 37... Línea 37...
37
 * @copyright (c) 2015 Moodlerooms Inc. (http://www.moodlerooms.com)
37
 * @copyright (c) 2015 Moodlerooms Inc. (http://www.moodlerooms.com)
38
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
38
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
39
 *
39
 *
40
 * @coversDefaultClass \cachestore_redis
40
 * @coversDefaultClass \cachestore_redis
41
 */
41
 */
42
class cachestore_redis_test extends \cachestore_tests {
42
final class cachestore_redis_test extends \cachestore_tests {
43
    /** @var cachestore_redis $store Redis Cache Store. */
43
    /** @var cachestore_redis $store Redis Cache Store. */
44
    protected $store;
44
    protected $store;
Línea 45... Línea 45...
45
 
45
 
46
    /**
46
    /**
Línea 71... Línea 71...
71
     * Creates the required cachestore for the tests to run against Redis.
71
     * Creates the required cachestore for the tests to run against Redis.
72
     *
72
     *
73
     * @return cachestore_redis
73
     * @return cachestore_redis
74
     */
74
     */
75
    protected function create_cachestore_redis(): cachestore_redis {
75
    protected function create_cachestore_redis(): cachestore_redis {
76
        $definition = cache_definition::load_adhoc(cache_store::MODE_APPLICATION, 'cachestore_redis', 'phpunit_test');
76
        $definition = definition::load_adhoc(store::MODE_APPLICATION, 'cachestore_redis', 'phpunit_test');
77
        $store = new cachestore_redis('Test', cachestore_redis::unit_test_configuration());
77
        $store = new cachestore_redis('Test', cachestore_redis::unit_test_configuration());
78
        $store->initialise($definition);
78
        $store->initialise($definition);
79
        $this->store = $store;
79
        $this->store = $store;
80
        $store->purge();
80
        $store->purge();
81
        return $store;
81
        return $store;