You are here

public function ClassyTemplatesIdenticalToStableTest::testStableTemplatesIdenticalToClassy in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Theme/ClassyTemplatesIdenticalToStableTest.php \Drupal\Tests\Core\Theme\ClassyTemplatesIdenticalToStableTest::testStableTemplatesIdenticalToClassy()
  2. 10 core/tests/Drupal/Tests/Core/Theme/ClassyTemplatesIdenticalToStableTest.php \Drupal\Tests\Core\Theme\ClassyTemplatesIdenticalToStableTest::testStableTemplatesIdenticalToClassy()

Confirms that certain Classy templates have equivalents in Stable.

@dataProvider providerTestStableTemplatesIdenticalToClassy

Parameters

string $template: The template file to test.

File

core/tests/Drupal/Tests/Core/Theme/ClassyTemplatesIdenticalToStableTest.php, line 22

Class

ClassyTemplatesIdenticalToStableTest
Confirms that certain Classy templates have identical equivalents in Stable.

Namespace

Drupal\Tests\Core\Theme

Code

public function testStableTemplatesIdenticalToClassy($template) {
  $stable_template = $this->root . '/core/themes/stable/templates' . $template;
  $classy_template = $this->root . '/core/themes/classy/templates' . $template;
  $this
    ->assertFileExists($stable_template);
  $this
    ->assertFileExists($classy_template);
  $this
    ->assertSame(md5_file($stable_template), md5_file($classy_template), 'The templates should have the same checksums.');
}