Skip to content

Commit

Permalink
Merge "Bump cache key for check results" into wmf/1.31.0-wmf.23
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Feb 28, 2018
2 parents b4b0c1e + ade0a5d commit 2a9c8a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Api/ResultsCache.php
Expand Up @@ -42,7 +42,7 @@ public function makeKey( EntityId $entityId, $languageCode = null ) {
return $this->cache->makeKey(
'WikibaseQualityConstraints', // extension
'checkConstraints', // action
'v2', // API response format version
'v2.1', // API response format version; .1: T188384
$entityId->getSerialization(),
$languageCode
);
Expand Down
6 changes: 3 additions & 3 deletions tests/phpunit/Api/ResultsCacheTest.php
Expand Up @@ -37,11 +37,11 @@ public function testMakeKey() {
$resultsCache = new ResultsCache( WANObjectCache::newEmpty() );

$this->assertSame(
'local:WikibaseQualityConstraints:checkConstraints:v2:Q5:en',
'local:WikibaseQualityConstraints:checkConstraints:v2.1:Q5:en',
$resultsCache->makeKey( new ItemId( 'Q5' ), 'en' )
);
$this->assertSame(
'local:WikibaseQualityConstraints:checkConstraints:v2:P31:de',
'local:WikibaseQualityConstraints:checkConstraints:v2.1:P31:de',
$resultsCache->makeKey( new PropertyId( 'P31' ), 'de' )
);
}
Expand All @@ -60,7 +60,7 @@ public function testMakeKey_qqx() {

$key = $resultsCache->makeKey( new ItemId( 'Q5' ), 'qqx' );

$this->assertSame( 'local:WikibaseQualityConstraints:checkConstraints:v2:Q5:qqx', $key );
$this->assertSame( 'local:WikibaseQualityConstraints:checkConstraints:v2.1:Q5:qqx', $key );
}

public function testGet() {
Expand Down

0 comments on commit 2a9c8a2

Please sign in to comment.