You are here

public function ConfigDependencyManagerTest::providerTestSortAll in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php \Drupal\Tests\Core\Config\ConfigDependencyManagerTest::providerTestSortAll()
  2. 9 core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php \Drupal\Tests\Core\Config\ConfigDependencyManagerTest::providerTestSortAll()

File

core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php, line 26

Class

ConfigDependencyManagerTest
Tests the ConfigDependencyManager class.

Namespace

Drupal\Tests\Core\Config

Code

public function providerTestSortAll() {
  $datasets[] = [
    [
      'provider.entity_b' => [],
      'provider.entity_a' => [],
    ],
    [
      'provider.entity_a',
      'provider.entity_b',
    ],
  ];
  $datasets[] = [
    [
      'provider.entity_a' => [],
      'provider.entity_b' => [],
    ],
    [
      'provider.entity_a',
      'provider.entity_b',
    ],
  ];
  $datasets[] = [
    [
      'provider.entity_b' => [
        'dependencies' => [
          'config' => [
            'provider.entity_a',
          ],
        ],
      ],
      'provider.entity_a' => [],
    ],
    [
      'provider.entity_a',
      'provider.entity_b',
    ],
  ];
  $datasets[] = [
    [
      'provider.entity_a' => [],
      'provider.entity_b' => [
        'dependencies' => [
          'config' => [
            'provider.entity_a',
          ],
        ],
      ],
    ],
    [
      'provider.entity_a',
      'provider.entity_b',
    ],
  ];
  $datasets[] = [
    [
      'provider.entity_b' => [],
      'provider.entity_a' => [
        'dependencies' => [
          'config' => [
            'provider.entity_b',
          ],
        ],
      ],
    ],
    [
      'provider.entity_b',
      'provider.entity_a',
    ],
  ];
  $datasets[] = [
    [
      'provider.entity_a' => [
        'dependencies' => [
          'config' => [
            'provider.entity_b',
          ],
        ],
      ],
      'provider.entity_b' => [],
    ],
    [
      'provider.entity_b',
      'provider.entity_a',
    ],
  ];
  $datasets[] = [
    [
      'provider.entity_a' => [
        'dependencies' => [
          'config' => [
            'provider.entity_b',
          ],
        ],
      ],
      'provider.entity_b' => [],
      'block.block.a' => [],
      'block.block.b' => [],
    ],
    [
      'block.block.a',
      'provider.entity_b',
      'block.block.b',
      'provider.entity_a',
    ],
  ];
  $datasets[] = [
    [
      'provider.entity_b' => [],
      'block.block.b' => [],
      'block.block.a' => [],
      'provider.entity_a' => [
        'dependencies' => [
          'config' => [
            'provider.entity_b',
          ],
        ],
      ],
    ],
    [
      'block.block.a',
      'provider.entity_b',
      'block.block.b',
      'provider.entity_a',
    ],
  ];
  $datasets[] = [
    [
      'provider.entity_b' => [],
      'block.block.b' => [],
      'block.block.a' => [],
      'provider.entity_a' => [
        'dependencies' => [
          'config' => [
            'provider.entity_b',
          ],
        ],
      ],
      'provider.entity_c' => [
        'dependencies' => [
          'config' => [
            'block.block.a',
          ],
        ],
      ],
    ],
    [
      'block.block.a',
      'block.block.b',
      'provider.entity_b',
      'provider.entity_a',
      'provider.entity_c',
    ],
  ];
  $datasets[] = [
    [
      'provider.entity_b' => [
        'dependencies' => [
          'module' => [
            'system',
          ],
        ],
      ],
      'block.block.b' => [],
      'block.block.a' => [
        'dependencies' => [
          'module' => [
            'system',
          ],
        ],
      ],
      'provider.entity_a' => [
        'dependencies' => [
          'config' => [
            'provider.entity_c',
          ],
        ],
      ],
      'provider.entity_c' => [
        'dependencies' => [
          'config' => [
            'block.block.a',
          ],
        ],
      ],
    ],
    [
      'block.block.b',
      'block.block.a',
      'provider.entity_c',
      'provider.entity_a',
      'provider.entity_b',
    ],
  ];
  return $datasets;
}