Skip to content

Commit

Permalink
Merge pull request #431 from jackalope/1-to-2
Browse files Browse the repository at this point in the history
1 to 2
  • Loading branch information
dbu authored Nov 22, 2023
2 parents 901d040 + 672fdc8 commit d4fb951
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Changelog
1.x
===

1.10.1
------

* Bugfix: Correctly handle cache fetches in CachedClient BC layer.

1.10.0
------

Expand Down
10 changes: 8 additions & 2 deletions tests/Jackalope/Transport/DoctrineDBAL/CachedClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ public function testArrayObjectIsConvertedToArray(): void
self::assertIsArray($namespaces);
}

public function testCacheHit()
{
$cache = new \stdClass();
$cache->foo = 'bar';
$this->cache->set('nodes:_/test,_tests', $cache);
$this->assertEquals($cache, $this->transport->getNode('/test'));
}

/**
* The default key sanitizer replaces spaces with underscores.
*/
Expand All @@ -52,8 +60,6 @@ public function testCustomKeySanitizer(): void
return strrev($cacheKey);
});

/** @var CachedClient $cachedClient */
$cachedClient = $this->transport;
$cachedClient->getNodeTypes();

$this->assertTrue($this->cache->has('sepyt_edon'));
Expand Down

0 comments on commit d4fb951

Please sign in to comment.