File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
DependencyInjection/Compiler Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ public function testProcessWithDoctrineDBALVersionAtLeast30(): void
83
83
84
84
public function testProcessWithDoctrineDBALVersionLowerThan30 (): void
85
85
{
86
- if (self ::isDoctrineDBALVersion3Installed ()) {
87
- $ this ->markTestSkipped ('This test requires the version of the "doctrine/dbal" Composer package to be < 3.0 . ' );
86
+ if (! self ::isDoctrineDBALVersion2Installed ()) {
87
+ $ this ->markTestSkipped ('This test requires the version of the "doctrine/dbal" Composer package to be ^2.13 . ' );
88
88
}
89
89
90
90
$ connection1 = (new Definition (Connection::class))->setPublic (true );
@@ -123,6 +123,10 @@ public function testProcessWithDoctrineDBALVersionLowerThan213OrMissing(): void
123
123
*/
124
124
public function testProcessDoesNothingIfConditionsForEnablingTracingAreMissing (ContainerBuilder $ container ): void
125
125
{
126
+ if (! self ::isDoctrineDBALInstalled ()) {
127
+ $ this ->markTestSkipped ('This test requires the "doctrine/dbal" Composer package. ' );
128
+ }
129
+
126
130
$ connectionConfigDefinition = new Definition ();
127
131
$ connectionConfigDefinition ->setClass (Configuration::class);
128
132
$ connectionConfigDefinition ->setPublic (true );
Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ protected static function isDoctrineDBALInstalled(): bool
16
16
return interface_exists (Driver::class);
17
17
}
18
18
19
+ protected static function isDoctrineDBALVersion2Installed (): bool
20
+ {
21
+ return self ::isDoctrineDBALInstalled ()
22
+ && ! self ::isDoctrineDBALVersion3Installed ();
23
+ }
24
+
19
25
protected static function isDoctrineDBALVersion3Installed (): bool
20
26
{
21
27
return interface_exists (Middleware::class);
You can’t perform that action at this time.
0 commit comments