File tree Expand file tree Collapse file tree 7 files changed +13
-13
lines changed
Expand file tree Collapse file tree 7 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 4343 "spatie/phpunit-watcher" : " ^1.24" ,
4444 "vimeo/psalm" : " ^5.26.1 || ^6.9.1" ,
4545 "vlucas/phpdotenv" : " ^5.6.2" ,
46- "yiisoft/cache" : " ^3.1" ,
4746 "yiisoft/db-mssql" : " ^2.0" ,
4847 "yiisoft/db-mysql" : " ^2.0" ,
4948 "yiisoft/db-oracle" : " ^2.0" ,
5049 "yiisoft/db-pgsql" : " ^2.0" ,
5150 "yiisoft/db-sqlite" : " ^2.0" ,
51+ "yiisoft/psr-dummy-provider" : " ^1.0.2" ,
5252 "yiisoft/test-support" : " ^3.0"
5353 },
5454 "autoload" : {
Original file line number Diff line number Diff line change 44
55namespace Yiisoft \Data \Db \Tests \Mssql ;
66
7- use Yiisoft \Cache \ArrayCache ;
87use Yiisoft \Data \Db \Tests \TestHelper ;
98use Yiisoft \Db \Cache \SchemaCache ;
109use Yiisoft \Db \Driver \Pdo \PdoConnectionInterface ;
1110use Yiisoft \Db \Mssql \Connection ;
1211use Yiisoft \Db \Mssql \Driver ;
12+ use Yiisoft \Test \Support \SimpleCache \MemorySimpleCache ;
1313
1414trait DatabaseTrait
1515{
@@ -28,7 +28,7 @@ protected function makeConnection(): PdoConnectionInterface
2828 );
2929 $ pdoDriver ->charset ('UTF8MB4 ' );
3030
31- $ db = new Connection ($ pdoDriver , new SchemaCache (new ArrayCache ()));
31+ $ db = new Connection ($ pdoDriver , new SchemaCache (new MemorySimpleCache ()));
3232
3333 TestHelper::loadFixtures ($ db );
3434
Original file line number Diff line number Diff line change 44
55namespace Yiisoft \Data \Db \Tests \Mysql ;
66
7- use Yiisoft \Cache \ArrayCache ;
87use Yiisoft \Data \Db \Tests \TestHelper ;
98use Yiisoft \Db \Cache \SchemaCache ;
109use Yiisoft \Db \Driver \Pdo \PdoConnectionInterface ;
1110use Yiisoft \Db \Mysql \Connection ;
1211use Yiisoft \Db \Mysql \Driver ;
12+ use Yiisoft \Test \Support \SimpleCache \MemorySimpleCache ;
1313
1414trait DatabaseTrait
1515{
@@ -24,7 +24,7 @@ protected function makeConnection(): PdoConnectionInterface
2424 $ pdoDriver = new Driver ("mysql:host= $ host;dbname= $ database;port= $ port " , $ user , $ password );
2525 $ pdoDriver ->charset ('UTF8MB4 ' );
2626
27- $ db = new Connection ($ pdoDriver , new SchemaCache (new ArrayCache ()));
27+ $ db = new Connection ($ pdoDriver , new SchemaCache (new MemorySimpleCache ()));
2828
2929 TestHelper::loadFixtures ($ db );
3030
Original file line number Diff line number Diff line change 55namespace Yiisoft \Data \Db \Tests \Oracle ;
66
77use PDO ;
8- use Yiisoft \Cache \ArrayCache ;
98use Yiisoft \Data \Db \Tests \TestHelper ;
109use Yiisoft \Db \Cache \SchemaCache ;
1110use Yiisoft \Db \Driver \Pdo \PdoConnectionInterface ;
1211use Yiisoft \Db \Oracle \Connection ;
1312use Yiisoft \Db \Oracle \Driver ;
13+ use Yiisoft \Test \Support \SimpleCache \MemorySimpleCache ;
1414
1515trait DatabaseTrait
1616{
@@ -26,7 +26,7 @@ protected function makeConnection(): PdoConnectionInterface
2626 $ pdoDriver ->charset ('AL32UTF8 ' );
2727 $ pdoDriver ->attributes ([PDO ::ATTR_STRINGIFY_FETCHES => true ]);
2828
29- $ db = new Connection ($ pdoDriver , new SchemaCache (new ArrayCache ()));
29+ $ db = new Connection ($ pdoDriver , new SchemaCache (new MemorySimpleCache ()));
3030
3131 TestHelper::loadFixtures ($ db );
3232
Original file line number Diff line number Diff line change 44
55namespace Yiisoft \Data \Db \Tests \Pgsql ;
66
7- use Yiisoft \Cache \ArrayCache ;
87use Yiisoft \Data \Db \Tests \TestHelper ;
98use Yiisoft \Db \Cache \SchemaCache ;
109use Yiisoft \Db \Driver \Pdo \PdoConnectionInterface ;
1110use Yiisoft \Db \Pgsql \Connection ;
1211use Yiisoft \Db \Pgsql \Driver ;
12+ use Yiisoft \Test \Support \SimpleCache \MemorySimpleCache ;
1313
1414trait DatabaseTrait
1515{
@@ -24,7 +24,7 @@ protected function makeConnection(): PdoConnectionInterface
2424 $ pdoDriver = new Driver ("pgsql:host= $ host;dbname= $ database;port= $ port " , $ user , $ password );
2525 $ pdoDriver ->charset ('UTF8 ' );
2626
27- $ db = new Connection ($ pdoDriver , new SchemaCache (new ArrayCache ()));
27+ $ db = new Connection ($ pdoDriver , new SchemaCache (new MemorySimpleCache ()));
2828
2929 TestHelper::loadFixtures ($ db );
3030
Original file line number Diff line number Diff line change 44
55namespace Yiisoft \Data \Db \Tests \Sqlite ;
66
7- use Yiisoft \Cache \ArrayCache ;
87use Yiisoft \Data \Db \Tests \TestHelper ;
98use Yiisoft \Db \Cache \SchemaCache ;
109use Yiisoft \Db \Sqlite \Connection ;
1110use Yiisoft \Db \Sqlite \Driver ;
11+ use Yiisoft \Test \Support \SimpleCache \MemorySimpleCache ;
1212
1313trait DatabaseTrait
1414{
1515 protected function makeConnection (): Connection
1616 {
1717 $ db = new Connection (
1818 new Driver ('sqlite::memory: ' ),
19- new SchemaCache (new ArrayCache ()),
19+ new SchemaCache (new MemorySimpleCache ()),
2020 );
2121 TestHelper::loadFixtures ($ db );
2222 return $ db ;
Original file line number Diff line number Diff line change 44
55namespace Yiisoft \Data \Db \Tests ;
66
7- use Yiisoft \Cache \NullCache ;
87use Yiisoft \Data \Db \FieldMapper \ArrayFieldMapper ;
98use Yiisoft \Data \Db \FilterHandler ;
109use Yiisoft \Data \Db \FilterHandler \AllHandler ;
3029use Yiisoft \Db \Schema \Column \ColumnBuilder ;
3130use Yiisoft \Db \Sqlite \Connection ;
3231use Yiisoft \Db \Sqlite \Driver ;
32+ use Yiisoft \Test \Support \SimpleCache \MemorySimpleCache ;
3333
3434final class TestHelper
3535{
3636 public static function createSqliteConnection (): Connection
3737 {
3838 return new Connection (
3939 new Driver ('sqlite::memory: ' ),
40- new SchemaCache (new NullCache ()),
40+ new SchemaCache (new MemorySimpleCache ()),
4141 );
4242 }
4343
You can’t perform that action at this time.
0 commit comments