diff --git a/tests/TestCase/Cache/Engine/XcacheEngineTest.php b/tests/TestCase/Cache/Engine/XcacheEngineTest.php index faa4b151c18..a5c6f59655e 100644 --- a/tests/TestCase/Cache/Engine/XcacheEngineTest.php +++ b/tests/TestCase/Cache/Engine/XcacheEngineTest.php @@ -82,6 +82,7 @@ public function testConfig() 'prefix' => 'cake_', 'duration' => 3600, 'probability' => 100, + 'groups' => [], ]; $this->assertTrue(isset($config['PHP_AUTH_USER'])); $this->assertTrue(isset($config['PHP_AUTH_PW'])); @@ -164,6 +165,9 @@ public function testDeleteCache() */ public function testClearCache() { + if ((PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg')) { + $this->markTestSkipped('Xcache administration functions are not available for the CLI.'); + } $data = 'this is a test of the emergency broadcasting system'; $result = Cache::write('clear_test_1', $data, 'xcache'); $this->assertTrue($result); @@ -171,7 +175,7 @@ public function testClearCache() $result = Cache::write('clear_test_2', $data, 'xcache'); $this->assertTrue($result); - $result = Cache::clear(); + $result = Cache::clear(false, 'xcache'); $this->assertTrue($result); } @@ -185,7 +189,7 @@ public function testDecrement() $result = Cache::write('test_decrement', 5, 'xcache'); $this->assertTrue($result); - $result = Cache::decrement('test_decrement', 'xcache'); + $result = Cache::decrement('test_decrement', 1, 'xcache'); $this->assertEquals(4, $result); $result = Cache::read('test_decrement', 'xcache'); @@ -208,7 +212,7 @@ public function testIncrement() $result = Cache::write('test_increment', 5, 'xcache'); $this->assertTrue($result); - $result = Cache::increment('test_increment', 'xcache'); + $result = Cache::increment('test_increment', 1, 'xcache'); $this->assertEquals(6, $result); $result = Cache::read('test_increment', 'xcache');