Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Apr 6, 2024
1 parent 1ff8e29 commit 4195f87
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/OrmTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,24 @@ public function testCacheStandalone(): void
$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();
}

Expand Down

0 comments on commit 4195f87

Please sign in to comment.