Proyectos de Subversion Moodle

Rev

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

Rev 11 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...
17
namespace cachestore_file;
17
namespace cachestore_file;
18
 
18
 
19
use cache_definition;
19
use core_cache\definition;
Línea 20... Línea 20...
20
use cache_store;
20
use core_cache\store;
21
use cachestore_file;
21
use cachestore_file;
22
 
22
 
Línea 27... Línea 27...
27
 * @copyright Catalyst IT Europe Ltd 2021
27
 * @copyright Catalyst IT Europe Ltd 2021
28
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
28
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
29
 * @author    Jackson D'Souza <jackson.dsouza@catalyst-eu.net>
29
 * @author    Jackson D'Souza <jackson.dsouza@catalyst-eu.net>
30
 * @coversDefaultClass \cachestore_file
30
 * @coversDefaultClass \cachestore_file
31
 */
31
 */
32
class asyncpurge_test extends \advanced_testcase {
32
final class asyncpurge_test extends \advanced_testcase {
Línea 33... Línea 33...
33
 
33
 
34
    /**
34
    /**
35
     * Testing Asynchronous file store cache purge
35
     * Testing Asynchronous file store cache purge
36
     *
36
     *
Línea 41... Línea 41...
41
     */
41
     */
42
    public function test_cache_async_purge(): void {
42
    public function test_cache_async_purge(): void {
43
        $this->resetAfterTest(true);
43
        $this->resetAfterTest(true);
Línea 44... Línea 44...
44
 
44
 
45
        // Cache definition.
45
        // Cache definition.
Línea 46... Línea 46...
46
        $definition = cache_definition::load_adhoc(cache_store::MODE_APPLICATION, 'cachestore_file', 'phpunit_test');
46
        $definition = definition::load_adhoc(store::MODE_APPLICATION, 'cachestore_file', 'phpunit_test');
47
 
47
 
48
        // Extra config, set async purge = true.
48
        // Extra config, set async purge = true.
49
        $extraconfig = ['asyncpurge' => true, 'filecacherev' => time()];
49
        $extraconfig = ['asyncpurge' => true, 'filecacherev' => time()];