File tree Expand file tree Collapse file tree 5 files changed +40
-10
lines changed
Behavior/Functional/Driver/Common Expand file tree Collapse file tree 5 files changed +40
-10
lines changed Original file line number Diff line number Diff line change 3737 "require" : {
3838 "php" : " >=8.0" ,
3939 "psr/event-dispatcher" : " ^1" ,
40- "cycle/orm" : " ^2.7 " ,
40+ "cycle/orm" : " ^2.10 " ,
4141 "cycle/schema-builder" : " ^2.8" ,
4242 "psr/container" : " ^1.0|^2.0" ,
4343 "yiisoft/injector" : " ^1.0"
Original file line number Diff line number Diff line change @@ -25,8 +25,11 @@ abstract class BaseTest extends TestCase
2525
2626 public function setUp (): void
2727 {
28+ $ this ->setUpLogger ($ this ->getDriver ());
2829 if (self ::$ config ['debug ' ] ?? false ) {
2930 $ this ->enableProfiling ();
31+ } else {
32+ $ this ->disableProfiling ();
3033 }
3134
3235 $ this ->dbal = new DatabaseManager (new DatabaseConfig ());
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ public function testUpdateWithSelectCollection(): void
7373 $ product2 ->name = 'test2 ' ;
7474 $ product2 ->revision = 1 ;
7575
76- /// Add box item
76+ // Add box item
7777 $ product1 ->addBoxItem (
7878 new ProductBox (
7979 $ product1 ,
@@ -84,16 +84,16 @@ public function testUpdateWithSelectCollection(): void
8484 // Persist 2 products
8585 $ this ->save ($ product1 , $ product2 );
8686
87- /// Persist 2 with Fetch all products
88- $ this ->assertEquals (1 , $ product1 ->revision );
89- $ this ->assertEquals (1 , $ product2 ->revision );
87+ // Persist 2 with Fetch all products
88+ $ this ->assertSame (1 , $ product1 ->revision );
89+ $ this ->assertSame (1 , $ product2 ->revision );
9090 $ product1 ->name = '222 ' ;
9191
92- /// Persist 2
92+ // Persist 2
9393 $ this ->save ($ product1 );
94- $ this ->assertEquals (2 , $ product1 ->revision );
94+ $ this ->assertSame (2 , $ product1 ->revision );
9595
96- /// Persist 3 with Fetch all products
96+ // Persist 3 with Fetch all products
9797 $ product1 ->name = '333 ' ;
9898
9999 $ products = $ repo ->findAll ();
Original file line number Diff line number Diff line change 1717$ drivers = [
1818 'sqlite ' => new Database \Config \SQLiteDriverConfig (
1919 queryCache: true ,
20+ options: [
21+ 'logInterpolatedQueries ' => true ,
22+ ]
2023 ),
2124 'mysql ' => new Database \Config \MySQLDriverConfig (
2225 connection: new Database \Config \MySQL \TcpConnectionConfig (
2629 user: 'root ' ,
2730 password: 'root ' ,
2831 ),
29- queryCache: true
32+ queryCache: true ,
33+ options: [
34+ 'logInterpolatedQueries ' => true ,
35+ ],
3036 ),
3137 'postgres ' => new Database \Config \PostgresDriverConfig (
3238 connection: new Database \Config \Postgres \TcpConnectionConfig (
3844 ),
3945 schema: 'public ' ,
4046 queryCache: true ,
47+ options: [
48+ 'logInterpolatedQueries ' => true ,
49+ ],
4150 ),
4251 'sqlserver ' => new Database \Config \SQLServerDriverConfig (
4352 connection: new Database \Config \SQLServer \TcpConnectionConfig (
4756 user: 'SA ' ,
4857 password: 'SSpaSS__1 '
4958 ),
50- queryCache: true
59+ queryCache: true ,
60+ options: [
61+ 'logInterpolatedQueries ' => true ,
62+ ],
5163 ),
5264];
5365
You can’t perform that action at this time.
0 commit comments