You are here

public function StorageComparerTest::testCreateChangelistNoChange in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php \Drupal\Tests\Core\Config\StorageComparerTest::testCreateChangelistNoChange()

@covers ::createChangelist

File

core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php, line 107
Contains \Drupal\Tests\Core\Config\StorageComparerTest.

Class

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

Namespace

Drupal\Tests\Core\Config

Code

public function testCreateChangelistNoChange() {
  $config_data = $this
    ->getConfigData();
  $config_files = array_keys($config_data);
  $this->sourceStorage
    ->expects($this
    ->once())
    ->method('listAll')
    ->will($this
    ->returnValue($config_files));
  $this->targetStorage
    ->expects($this
    ->once())
    ->method('listAll')
    ->will($this
    ->returnValue($config_files));
  $this->sourceStorage
    ->expects($this
    ->once())
    ->method('readMultiple')
    ->will($this
    ->returnValue($config_data));
  $this->targetStorage
    ->expects($this
    ->once())
    ->method('readMultiple')
    ->will($this
    ->returnValue($config_data));
  $this->sourceStorage
    ->expects($this
    ->once())
    ->method('getAllCollectionNames')
    ->will($this
    ->returnValue(array()));
  $this->targetStorage
    ->expects($this
    ->once())
    ->method('getAllCollectionNames')
    ->will($this
    ->returnValue(array()));
  $this->storageComparer
    ->createChangelist();
  $this
    ->assertEmpty($this->storageComparer
    ->getChangelist('create'));
  $this
    ->assertEmpty($this->storageComparer
    ->getChangelist('delete'));
  $this
    ->assertEmpty($this->storageComparer
    ->getChangelist('update'));
}