@@ -96,18 +96,23 @@ public function testConnect()
9696 $ this ->assertEquals ('crate ' , $ row ['name ' ]);
9797 }
9898
99- public function testGetServerVersion ()
99+ public function testGetServerVersionNativeConnection ()
100100 {
101101 // Retrieve server version.
102102 $ serverVersion = $ this ->_conn ->getNativeConnection ()->getServerVersion ();
103+ $ this ->assertTrue (
104+ version_compare ($ serverVersion , '0.0.0 ' , '>= ' ),
105+ 'Server version should be at least 0.0.0 ' ,
106+ );
107+ }
103108
104- // Assume tests are running against CrateDB 5.x or higher, which is likely,
105- // because it will mostly be running on CrateDB nightly.
106- // Otherwise, we will need to populate this value from an external source,
107- // for example an environment variable populated by a CI build matrix.
109+ public function testGetServerVersionWrappedConnection ()
110+ {
111+ // Retrieve server version.
112+ $ serverVersion = $ this -> _conn -> getWrappedConnection ()-> getServerVersion ();
108113 $ this ->assertTrue (
109- version_compare ($ serverVersion , '5 .0.0 ' , '>= ' ),
110- 'Server version should be at least 5 .0.0 ' ,
114+ version_compare ($ serverVersion , '0 .0.0 ' , '>= ' ),
115+ 'Server version should be at least 0 .0.0 ' ,
111116 );
112117 }
113118
0 commit comments