function UpdateFetcherTest::setUp

Same name in other branches
  1. 9 core/modules/update/tests/src/Unit/UpdateFetcherTest.php \Drupal\Tests\update\Unit\UpdateFetcherTest::setUp()
  2. 10 core/modules/update/tests/src/Unit/UpdateFetcherTest.php \Drupal\Tests\update\Unit\UpdateFetcherTest::setUp()
  3. 11.x core/modules/update/tests/src/Unit/UpdateFetcherTest.php \Drupal\Tests\update\Unit\UpdateFetcherTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/update/tests/src/Unit/UpdateFetcherTest.php, line 25

Class

UpdateFetcherTest
Tests update functionality unrelated to the database.

Namespace

Drupal\Tests\update\Unit

Code

protected function setUp() {
    $config_factory = $this->getConfigFactoryStub([
        'update.settings' => [
            'fetch_url' => 'http://www.example.com',
        ],
    ]);
    $http_client_mock = $this->createMock('\\GuzzleHttp\\ClientInterface');
    $this->updateFetcher = new UpdateFetcher($config_factory, $http_client_mock);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.