File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,9 +115,16 @@ public function testConnectionFailWithLogger() : void
115115 }
116116 }
117117
118+ protected function mariadbHasSSL () : bool
119+ {
120+ $ version = static ::$ database ->getConnection ()->get_server_info ();
121+ $ version = \explode ('- ' , $ version , 2 )[0 ];
122+ return \version_compare ($ version , '11.4.0 ' , '>= ' );
123+ }
124+
118125 public function testConnectionWithSSL () : void
119126 {
120- if (\getenv ('DB_IMAGE ' ) === 'mariadb ' ) {
127+ if (\getenv ('DB_IMAGE ' ) === 'mariadb ' && ! $ this -> mariadbHasSSL () ) {
121128 $ this ->expectException (mysqli_sql_exception::class);
122129 $ this ->expectExceptionMessage ('MySQL server has gone away ' );
123130 }
@@ -146,7 +153,7 @@ protected function cipherStatus(Database $database) : void
146153
147154 public function testConnectionWithSSLNotVerified () : void
148155 {
149- if (\getenv ('DB_IMAGE ' ) === 'mariadb ' ) {
156+ if (\getenv ('DB_IMAGE ' ) === 'mariadb ' && ! $ this -> mariadbHasSSL () ) {
150157 $ this ->expectException (mysqli_sql_exception::class);
151158 $ this ->expectExceptionMessage ('MySQL server has gone away ' );
152159 }
You can’t perform that action at this time.
0 commit comments