Explorar o código

Improve unit test to not rely on mongodb server version dependent message

Rob Williams %!s(int64=8) %!d(string=hai) anos
pai
achega
5942a237c8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tests/Alcaeus/MongoDbAdapter/Mongo/MongoClientTest.php

+ 1 - 1
tests/Alcaeus/MongoDbAdapter/Mongo/MongoClientTest.php

@@ -74,7 +74,7 @@ class MongoClientTest extends TestCase
     public function testGetHostsExceptionHandling()
     {
         $this->expectException(\MongoConnectionException::class);
-        $this->expectExceptionMessageRegExp('/No suitable servers found/');
+        $this->expectExceptionMessageRegExp('/fake_host/');
 
         $client = $this->getClient(null, 'mongodb://fake_host');
         $client->getHosts();