Skip to content
Snippets Groups Projects

Always default the module name setting for database driver to their driver name

Closes #3450706

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
297 297 return [
298 298 ['foo', '', "Missing scheme in URL 'foo'"],
299 299 ['foo', 'bar', "Missing scheme in URL 'foo'"],
300 ['foo://', 'bar', "Can not convert 'foo://' to a database connection, the module providing the driver 'foo' is not specified"],
301 ['foo://bar', 'baz', "Can not convert 'foo://bar' to a database connection, the module providing the driver 'foo' is not specified"],
302 ['foo://bar:port', 'baz', "Can not convert 'foo://bar:port' to a database connection, the module providing the driver 'foo' is not specified"],
303 300 ['foo/bar/baz', 'bar2', "Missing scheme in URL 'foo/bar/baz'"],
304 ['foo://bar:baz@test1', 'test2', "Can not convert 'foo://bar:baz@test1' to a database connection, the module providing the driver 'foo' is not specified"],
305 301 ];
306 302 }
307 303
304 /**
305 * Tests that the exception for having no module setting is not thrown.
306 */
307 public function testNoModuleIsSpecifiedExceptionIsRemoved() {
  • added 1 commit

    • dd2a6c26 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • quietone
  • 304 ['foo://bar:baz@test1', 'test2', "Can not convert 'foo://bar:baz@test1' to a database connection, the module providing the driver 'foo' is not specified"],
    305 301 ];
    306 302 }
    307 303
    304 /**
    305 * Tests that the exception for having no module setting is not thrown.
    306 */
    307 public function testNoModuleIsSpecifiedExceptionIsRemoved(): void {
    308 // Testing that for all database drivers, when the module setting is not
    309 // set, that it defaults to the driver name is not possible. We are
    310 // therefore testing that the exception is no longer being thrown. For non
    311 // core database driver the next exception that will be thrown is that for
    312 // the module that does not exist.
    313 $this->expectException(UnknownExtensionException::class);
    314 $this->expectExceptionMessage('The database_driver Drupal\mongodb\Driver\Database\mongodb does not exist.');
    315 $url = 'mongodb://test_user:test_pass@test_host/test_database';
    Please register or sign in to reply
    Loading