Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix testClear() case #1050

Merged
merged 1 commit into from

4 participants

@rynop

After clear of memcache config, all keys should be gone. So a read on a key should return false.

@rynop rynop Fix testClear() case
After clear of memcache config, all keys should be gone. So a read on a key should return false.
1881ff1
@markstory markstory merged commit f3f1e1a into cakephp:2.3
@lorenzo lorenzo referenced this pull request from a commit
@lorenzo lorenzo Revert "Merge pull request #1050 from rynop/2.3"
This reverts commit f3f1e1a, reversing
changes made to 9fc4678.
9cc4371
@lorenzo
Owner

I will revert this one as it actually breaks the test. Calling clear(true) will actually check for non-expired keys.

@markstory
Owner

My bad, sorry about that.

@doapp-ryanp

na thats my bad. sorry guys. was writing a memcached engine and I internally implemented clear differently than memcache engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 26, 2012
  1. @rynop

    Fix testClear() case

    rynop authored
    After clear of memcache config, all keys should be gone. So a read on a key should return false.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
View
2  lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
@@ -361,7 +361,7 @@ public function testClear() {
Cache::write('some_value', 'cache1', 'memcache');
$result = Cache::clear(true, 'memcache');
$this->assertTrue($result);
- $this->assertEquals('cache1', Cache::read('some_value', 'memcache'));
+ $this->assertEquals(false, Cache::read('some_value', 'memcache'));
Cache::write('some_value', 'cache2', 'memcache2');
$result = Cache::clear(false, 'memcache');
Something went wrong with that request. Please try again.