Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 15... Línea 15...
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...
17
namespace core_cache;
17
namespace core_cache;
18
 
18
 
19
/**
19
/**
20
 * Unit tests for cache_store functionality.
20
 * Unit tests for \core_cache\store functionality.
21
 *
21
 *
22
 * @package core_cache
22
 * @package core_cache
-
 
23
 * @copyright 2021 The Open University
23
 * @copyright 2021 The Open University
24
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 * @covers \core_cache\store
25
 */
-
 
26
class store_test extends \advanced_testcase {
26
 */
27
 
27
final class store_test extends \advanced_testcase {
28
    /**
28
    /**
29
     * Tests the default implementation of cache_size_details, which does some
29
     * Tests the default implementation of cache_size_details, which does some
30
     * complicated statistics.
30
     * complicated statistics.
Línea 65... Línea 65...
65
     * @return \cachestore_static Store
65
     * @return \cachestore_static Store
66
     */
66
     */
67
    protected static function create_static_store(): \cachestore_static {
67
    protected static function create_static_store(): \cachestore_static {
68
        require_once(__DIR__ . '/../stores/static/lib.php');
68
        require_once(__DIR__ . '/../stores/static/lib.php');
69
        $store = new \cachestore_static('frog');
69
        $store = new \cachestore_static('frog');
70
        $definition = \cache_definition::load('zombie', [
70
        $definition = definition::load('zombie', [
71
                'mode' => \cache_store::MODE_REQUEST,
71
            'mode' => store::MODE_REQUEST,
72
                'component' => 'phpunit',
72
            'component' => 'phpunit',
73
                'area' => 'store_test',
73
            'area' => 'store_test',
74
                'simplekeys' => true
74
            'simplekeys' => true,
75
        ]);
75
        ]);
76
        $store->initialise($definition);
76
        $store->initialise($definition);
77
        return $store;
77
        return $store;
78
    }
78
    }
79
}
79
}