Skip to content

Commit a2d9eac

Browse files
committed
Fix exception message for different mongo versions
1 parent c44cce6 commit a2d9eac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function testAuth()
104104
$port = Config::get('database.connections.mongodb.port', 27017);
105105
$database = Config::get('database.connections.mongodb.database');
106106

107-
$this->setExpectedException('MongoConnectionException', "Failed to connect to: $host:$port: Authentication failed on database '$database' with username 'foo': auth fails");
107+
$this->setExpectedExceptionRegExp('MongoConnectionException', "/Failed to connect to: $host:$port: Authentication failed on database '$database' with username 'foo': auth fail/");
108108
$connection = DB::connection('mongodb');
109109
}
110110

0 commit comments

Comments
 (0)