function UrlConversionTest::setUp
Overrides UnitTestCase::setUp
File
- 
              core/tests/ Drupal/ Tests/ Core/ Database/ UrlConversionTest.php, line 26 
Class
- UrlConversionTest
- Tests for database URL to/from database connection array conversions.
Namespace
Drupal\Tests\Core\DatabaseCode
protected function setUp() : void {
  parent::setUp();
  $this->root = dirname(__FILE__, 7);
  // Mock the container so we don't need to mock drupal_valid_test_ua().
  // @see \Drupal\Core\Extension\ExtensionDiscovery::scan()
  $container = $this->createMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
  $container->expects($this->any())
    ->method('has')
    ->with('kernel')
    ->willReturn(TRUE);
  $container->expects($this->any())
    ->method('getParameter')
    ->with('site.path')
    ->willReturn('');
  \Drupal::setContainer($container);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
