From 701b063791c824a0524714eda451d1c9ca34e675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Sat, 13 Jul 2013 15:37:31 +0200 Subject: [PATCH] MDL-40611 fix context cache size expectation --- lib/tests/accesslib_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tests/accesslib_test.php b/lib/tests/accesslib_test.php index e4d292b1fca..b63a86849b1 100644 --- a/lib/tests/accesslib_test.php +++ b/lib/tests/accesslib_test.php @@ -2327,7 +2327,7 @@ class accesslib_testcase extends advanced_testcase { $this->assertEquals(context_inspection::test_context_cache_size(), CONTEXT_CACHE_MAX_SIZE); } else if ($i == CONTEXT_CACHE_MAX_SIZE) { // once the limit is reached roughly 1/3 of records should be removed from cache - $this->assertEquals(context_inspection::test_context_cache_size(), (int)(CONTEXT_CACHE_MAX_SIZE * (2/3) +102)); + $this->assertEquals(context_inspection::test_context_cache_size(), (int)ceil(CONTEXT_CACHE_MAX_SIZE * (2/3) + 101)); } } // We keep the first 100 cached