88use PHPUnit \Framework \TestCase ;
99use Symfony \Component \Cache \Adapter \ArrayAdapter ;
1010use Tempest \Cache \CacheConfig ;
11- use Tempest \Cache \GenericCache ;
11+ use Tempest \Cache \ProjectCache ;
1212use Tempest \Clock \MockClock ;
1313
1414/**
@@ -20,7 +20,7 @@ public function test_put(): void
2020 {
2121 $ clock = new MockClock ();
2222 $ pool = new ArrayAdapter (clock: $ clock );
23- $ cache = new GenericCache (new CacheConfig ($ pool ));
23+ $ cache = new ProjectCache (new CacheConfig (projectCachePool: $ pool, enable: true ));
2424 $ interval = new DateInterval ('P1D ' );
2525
2626 $ cache ->put ('a ' , 'a ' , $ clock ->now ()->add ($ interval ));
@@ -44,7 +44,7 @@ public function test_get(): void
4444 {
4545 $ clock = new MockClock ();
4646 $ pool = new ArrayAdapter (clock: $ clock );
47- $ cache = new GenericCache (new CacheConfig ($ pool ));
47+ $ cache = new ProjectCache (new CacheConfig (projectCachePool: $ pool, enable: true ));
4848 $ interval = new DateInterval ('P1D ' );
4949
5050 $ cache ->put ('a ' , 'a ' , $ clock ->now ()->add ($ interval ));
@@ -64,10 +64,10 @@ public function test_resolve(): void
6464 $ clock = new MockClock ();
6565 $ pool = new ArrayAdapter (clock: $ clock );
6666 $ config = new CacheConfig (
67- pool : $ pool ,
68- enabled : true ,
67+ projectCachePool : $ pool ,
68+ enable : true ,
6969 );
70- $ cache = new GenericCache ($ config );
70+ $ cache = new ProjectCache ($ config );
7171 $ interval = new DateInterval ('P1D ' );
7272
7373 $ a = $ cache ->resolve ('a ' , fn () => 'a ' , $ clock ->now ()->add ($ interval ));
@@ -88,7 +88,7 @@ public function test_resolve(): void
8888 public function test_remove (): void
8989 {
9090 $ pool = new ArrayAdapter ();
91- $ cache = new GenericCache (new CacheConfig ($ pool ));
91+ $ cache = new ProjectCache (new CacheConfig (projectCachePool: $ pool, enable: true ));
9292
9393 $ cache ->put ('a ' , 'a ' );
9494
@@ -100,7 +100,7 @@ public function test_remove(): void
100100 public function test_clear (): void
101101 {
102102 $ pool = new ArrayAdapter ();
103- $ cache = new GenericCache ( new CacheConfig ($ pool ));
103+ $ cache = new ProjectCache (cacheConfig: new CacheConfig (projectCachePool: $ pool ));
104104
105105 $ cache ->put ('a ' , 'a ' );
106106 $ cache ->put ('b ' , 'b ' );
0 commit comments