File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Yii Cache Change Log
22
3- ## 2 .0.1 under development
3+ ## 3 .0.0 under development
44
5- - no changes in this release.
5+ - Chg # 117 : Adapt configuration group names to Yii conventions ( @ vjik )
66
77## 2.0.0 June 29, 2022
88
Original file line number Diff line number Diff line change 3939 "rector/rector" : " ^0.15.2" ,
4040 "roave/infection-static-analysis-plugin" : " ^1.16" ,
4141 "spatie/phpunit-watcher" : " ^1.23" ,
42- "vimeo/psalm" : " ^4.30|^5.6"
42+ "vimeo/psalm" : " ^4.30|^5.6" ,
43+ "yiisoft/di" : " ^1.2"
4344 },
4445 "provide" : {
4546 "psr/simple-cache-implementation" : " 2.0|3.0"
6768 "source-directory" : " config"
6869 },
6970 "config-plugin" : {
70- "common " : " common .php"
71+ "di " : " di .php"
7172 }
7273 },
7374 "config" : {
File renamed without changes.
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Yiisoft \Cache \Tests ;
6+
7+ use Yiisoft \Cache \ArrayCache ;
8+ use Yiisoft \Cache \Cache ;
9+ use Yiisoft \Di \Container ;
10+ use Yiisoft \Di \ContainerConfig ;
11+
12+ final class ConfigTest extends TestCase
13+ {
14+ public function testBase (): void
15+ {
16+ $ container = $ this ->createContainer ();
17+
18+ $ yiiCache = $ container ->get (\Yiisoft \Cache \CacheInterface::class);
19+ $ psrCache = $ container ->get (\Psr \SimpleCache \CacheInterface::class);
20+
21+ $ this ->assertInstanceOf (Cache::class, $ yiiCache );
22+ $ this ->assertInstanceOf (ArrayCache::class, $ psrCache );
23+ }
24+
25+ private function createContainer (): Container
26+ {
27+ return new Container (
28+ ContainerConfig::create ()->withDefinitions (
29+ $ this ->getDiConfig ()
30+ )
31+ );
32+ }
33+
34+ private function getDiConfig (): array
35+ {
36+ return require dirname (__DIR__ ) . '/config/di.php ' ;
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments