public function testConfigChangeSet() { $configId = new EntityConfigId('entity', self::ENTITY_CLASS); $originalConfig = $this->getConfig($configId, ['item1' => true, 'item11' => true, 'item12' => true, 'item2' => 123, 'item21' => 123, 'item22' => 123, 'item3' => 'val2', 'item4' => 'val4', 'item6' => null, 'item7' => 'val7']); $this->configCache->expects($this->once())->method('getEntityConfig')->willReturn($originalConfig); $this->configManager->getConfig($configId); $changedConfig = $this->getConfig($configId, ['item1' => true, 'item11' => 1, 'item12' => false, 'item2' => 123, 'item21' => '123', 'item22' => 456, 'item3' => 'val21', 'item5' => 'val5', 'item6' => 'val6', 'item7' => null]); $this->configManager->persist($changedConfig); $this->configManager->calculateConfigChangeSet($changedConfig); $this->assertEquals(['item12' => [true, false], 'item22' => [123, 456], 'item3' => ['val2', 'val21'], 'item5' => [null, 'val5'], 'item6' => [null, 'val6'], 'item7' => ['val7', null]], $this->configManager->getConfigChangeSet($changedConfig)); }