diff --git a/tests/Io/FactoryTest.php b/tests/Io/FactoryTest.php index 6675abd..ac05dab 100644 --- a/tests/Io/FactoryTest.php +++ b/tests/Io/FactoryTest.php @@ -169,13 +169,13 @@ public function testConnectWithInvalidPassRejectsWithAuthenticationError() $this->logicalAnd( $this->isInstanceOf('RuntimeException'), $this->callback(function (\RuntimeException $e) { - return !!preg_match("/^Connection to mysql:\/\/[^ ]* failed during authentication: Access denied for user '.*?'@'.*?' \(using password: YES\) \(EACCES\)$/", $e->getMessage()); + return !!preg_match("/^Connection to mysql:\/\/[^ ]* failed during authentication: Access denied for user '.*?'@'.*?'( \(using password: YES\))? \(EACCES\)$/", $e->getMessage()); }), $this->callback(function (\RuntimeException $e) { return $e->getCode() === (defined('SOCKET_EACCES') ? SOCKET_EACCES : 13); }), $this->callback(function (\RuntimeException $e) { - return !!preg_match("/^Access denied for user '.*?'@'.*?' \(using password: YES\)$/", $e->getPrevious()->getMessage()); + return !!preg_match("/^Access denied for user '.*?'@'.*?'( \(using password: YES\))?$/", $e->getPrevious()->getMessage()); }) ) ));