From 4195f87731cca2376046a23064f5dbe80076f6e3 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 6 Apr 2024 20:00:44 +0200 Subject: [PATCH] Improve tests --- tests/OrmTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/OrmTest.php b/tests/OrmTest.php index 284d9d0..c609cbb 100644 --- a/tests/OrmTest.php +++ b/tests/OrmTest.php @@ -598,10 +598,24 @@ final class OrmTest extends TestCase $this->assertCount(0, $orm2Uncached); delay(0.9); $this->assertCount(1, $orm2Uncached); + $fieldNoCache2 = new DbArrayBuilder("testCacheStandalone_arr2", new RedisSettings( + RedisConfig::fromUri("redis://127.0.0.1"), + cacheTtl: 100 + ), KeyType::INT, ValueType::INT); + $orm2Uncached = $fieldNoCache2->build($orm2Uncached); + $this->assertCount(1, $orm2Uncached); $orm2Uncached->clear(); $obj->arr4->set(0, 1); $this->assertCount(1, $orm4Uncached); + + $fieldNoCache4 = new DbArrayBuilder("testCacheStandalone_arr4", new RedisSettings( + RedisConfig::fromUri("redis://127.0.0.1"), + cacheTtl: 100 + ), KeyType::INT, ValueType::INT); + $orm4Uncached = $fieldNoCache4->build($orm4Uncached); + $this->assertCount(1, $orm4Uncached); + $orm4Uncached->clear(); }