Unverified Commit 5396462b authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3281452 by longwave, mrinalini9, deviantintegral, Spokje: Update Core...

Issue #3281452 by longwave, mrinalini9, deviantintegral, Spokje: Update Core kernel tests to not use Bartik and Seven

(cherry picked from commit 4411770d)
parent 41c0e897
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ function module_test_system_info_alter(&$info, Extension $file, $type) {
      $info['version'] = '8.x-1.0';
    }
  }
  if ($file->getName() == 'seven' && $type == 'theme') {
  if ($file->getName() == 'stark' && $type == 'theme') {
    $info['regions']['test_region'] = 'Test region';
  }
}
+3 −3
Original line number Diff line number Diff line
@@ -604,7 +604,7 @@ public function testUnmetDependency() {
    $config_entity_data = $sync->read('config_test.dynamic.dotted.default');
    $config_entity_data['dependencies'] = ['module' => ['unknown', 'dblog']];
    $sync->write('config_test.dynamic.dotted.module', $config_entity_data);
    $config_entity_data['dependencies'] = ['theme' => ['unknown', 'seven']];
    $config_entity_data['dependencies'] = ['theme' => ['unknown', 'stark']];
    $sync->write('config_test.dynamic.dotted.theme', $config_entity_data);
    $config_entity_data['dependencies'] = ['config' => ['unknown', 'unknown2']];
    $sync->write('config_test.dynamic.dotted.config', $config_entity_data);
@@ -623,7 +623,7 @@ public function testUnmetDependency() {
        'Configuration <em class="placeholder">config_test.dynamic.dotted.config</em> depends on configuration (<em class="placeholder">unknown, unknown2</em>) that will not exist after import.',
        'Configuration <em class="placeholder">config_test.dynamic.dotted.existing</em> depends on the <em class="placeholder">config_test.dynamic.dotted.deleted</em> configuration that will not exist after import.',
        'Configuration <em class="placeholder">config_test.dynamic.dotted.module</em> depends on modules (<em class="placeholder">unknown, Database Logging</em>) that will not be installed after import.',
        'Configuration <em class="placeholder">config_test.dynamic.dotted.theme</em> depends on themes (<em class="placeholder">unknown, Seven</em>) that will not be installed after import.',
        'Configuration <em class="placeholder">config_test.dynamic.dotted.theme</em> depends on themes (<em class="placeholder">unknown, Stark</em>) that will not be installed after import.',
        'Configuration <em class="placeholder">unknown.config</em> depends on the <em class="placeholder">unknown</em> extension that will not be installed after import.',
      ];
      $this->assertEquals(implode(PHP_EOL, $expected), $e->getMessage());
@@ -631,7 +631,7 @@ public function testUnmetDependency() {
      $expected = [
        'Configuration <em class="placeholder">config_test.dynamic.dotted.config</em> depends on configuration (<em class="placeholder">unknown, unknown2</em>) that will not exist after import.',
        'Configuration <em class="placeholder">config_test.dynamic.dotted.module</em> depends on modules (<em class="placeholder">unknown, Database Logging</em>) that will not be installed after import.',
        'Configuration <em class="placeholder">config_test.dynamic.dotted.theme</em> depends on themes (<em class="placeholder">unknown, Seven</em>) that will not be installed after import.',
        'Configuration <em class="placeholder">config_test.dynamic.dotted.theme</em> depends on themes (<em class="placeholder">unknown, Stark</em>) that will not be installed after import.',
      ];
      foreach ($expected as $expected_message) {
        $this->assertContainsEquals($expected_message, $error_log, $expected_message);
+0 −16
Original line number Diff line number Diff line
@@ -42,22 +42,6 @@ class DefaultConfigTest extends KernelTestBase {
    'config_schema_test.someschema',
  ];

  /**
   * Themes which provide default configuration and need enabling.
   *
   * If a theme provides default configuration but does not have a schema
   * because it can rely on schemas added by system_config_schema_info_alter()
   * then this test needs to enable it.
   *
   * @var array
   */
  protected $themes = ['seven'];

  protected function setUp(): void {
    parent::setUp();
    \Drupal::service('theme_installer')->install($this->themes);
  }

  /**
   * {@inheritdoc}
   */
+3 −3
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ public function testInstallThemeWithMetModuleDependencies() {
   */
  public function testUninstallDefault() {
    $name = 'stark';
    $other_name = 'bartik';
    $other_name = 'olivero';
    $this->themeInstaller()->install([$name, $other_name]);
    $this->config('system.theme')->set('default', $name)->save();

@@ -257,7 +257,7 @@ public function testUninstallDefault() {
   */
  public function testUninstallAdmin() {
    $name = 'stark';
    $other_name = 'bartik';
    $other_name = 'olivero';
    $this->themeInstaller()->install([$name, $other_name]);
    $this->config('system.theme')->set('admin', $name)->save();

@@ -391,7 +391,7 @@ public function testUninstallNotInstalled() {
   * @see module_test_system_info_alter()
   */
  public function testThemeInfoAlter() {
    $name = 'seven';
    $name = 'stark';
    $this->container->get('state')->set('module_test.hook_system_info_alter', TRUE);

    $this->themeInstaller()->install([$name]);