function StorageComparerTest::setUp

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php \Drupal\Tests\Core\Config\StorageComparerTest::setUp()
  2. 10 core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php \Drupal\Tests\Core\Config\StorageComparerTest::setUp()
  3. 11.x core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php \Drupal\Tests\Core\Config\StorageComparerTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php, line 44

Class

StorageComparerTest
@coversDefaultClass \Drupal\Core\Config\StorageComparer @group Config

Namespace

Drupal\Tests\Core\Config

Code

protected function setUp() : void {
    $this->sourceStorage = $this->createMock('Drupal\\Core\\Config\\StorageInterface');
    $this->targetStorage = $this->createMock('Drupal\\Core\\Config\\StorageInterface');
    $this->sourceStorage
        ->expects($this->atLeastOnce())
        ->method('getCollectionName')
        ->will($this->returnValue(StorageInterface::DEFAULT_COLLECTION));
    $this->targetStorage
        ->expects($this->atLeastOnce())
        ->method('getCollectionName')
        ->will($this->returnValue(StorageInterface::DEFAULT_COLLECTION));
    $this->storageComparer = new StorageComparer($this->sourceStorage, $this->targetStorage);
}

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