Skip to content

Commit

Permalink
Merge pull request #18 from Nyholm/separator2
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
Nyholm committed Jan 11, 2016
2 parents 142c784 + d91e17b commit 864886a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/TaggableItemTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getTaggedKey()
*/
protected function getKeyFromTaggedKey($taggedKey)
{
if (false === $pos = strpos($taggedKey, ':')) {
if (false === $pos = strpos($taggedKey, TaggablePoolInterface::TAG_SEPARATOR)) {
return $taggedKey;
}

Expand Down
12 changes: 6 additions & 6 deletions tests/TaggableItemTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public function testGetKey()
$item = new CacheItem('key');
$this->assertEquals('key', $item->getKey());

$item = new CacheItem('key:foo');
$item = new CacheItem('key!foo');
$this->assertEquals('key', $item->getKey());

$item = new CacheItem('key:foo:bar');
$item = new CacheItem('key!foo!bar');
$this->assertEquals('key', $item->getKey());
}

Expand All @@ -32,10 +32,10 @@ public function testGetTaggedKey()
$item = new CacheItem('key');
$this->assertEquals('key', $item->getTaggedKey());

$item = new CacheItem('key:foo');
$this->assertEquals('key:foo', $item->getTaggedKey());
$item = new CacheItem('key!foo');
$this->assertEquals('key!foo', $item->getTaggedKey());

$item = new CacheItem('key:foo:bar');
$this->assertEquals('key:foo:bar', $item->getTaggedKey());
$item = new CacheItem('key!foo!bar');
$this->assertEquals('key!foo!bar', $item->getTaggedKey());
}
}

0 comments on commit 864886a

Please sign in to comment.