Skip to content
Permalink
Browse files

Fixed PersistenceCachePurger not returning location Ids after clearin…

…g content cache. Needed by eZContentCacheManager in legacy.

Relates to EZP-20555
  • Loading branch information...
lolautruche committed Mar 20, 2013
1 parent 89ce1f1 commit 0e361de9d81d5edd6c173e1cfc40ed67ffbdc8d2
@@ -83,6 +83,9 @@ public function resetAllCleared()
* Either way all location and urlAlias cache is cleared as well.
*
* @param int|int[]|null $locationIds Ids of location we need to purge content cache for. Purges all content cache if null
*
* @return array|int|\int[]|null
*
* @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType On invalid $id type
*/
public function content( $locationIds = null )
@@ -114,6 +117,8 @@ public function content( $locationIds = null )
relatedCache:
$this->cache->clear( 'urlAlias' );
$this->cache->clear( 'location' );
return $locationIds;
}
/**
@@ -98,7 +98,7 @@ public function testClearAllContent()
->expects( $this->exactly( count( $map ) ) )
->method( 'clear' )
->will( $this->returnValueMap( $map ) );
$this->cachePurger->content();
$this->assertNull( $this->cachePurger->content() );
}
/**
@@ -144,7 +144,8 @@ public function testClearContent()
)
);
$this->cachePurger->content( array( $locationId1, $locationId2, $locationId3 ) );
$locationIds = array( $locationId1, $locationId2, $locationId3 );
$this->assertSame( $locationIds, $this->cachePurger->content( $locationIds ) );
}
/**
@@ -173,7 +174,7 @@ public function testClearOneContent()
)
);
$this->cachePurger->content( $locationId );
$this->assertSame( array( $locationId ), $this->cachePurger->content( $locationId ) );
}
/**

0 comments on commit 0e361de

Please sign in to comment.
You can’t perform that action at this time.