function GenerateThemeTest::doTestDevSnapshot

Same name and namespace in other branches
  1. main core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php \Drupal\BuildTests\Command\GenerateThemeTest::doTestDevSnapshot()

Tests the generate-theme command on a dev snapshot of Drupal core.

1 call to GenerateThemeTest::doTestDevSnapshot()
GenerateThemeTest::testGenerateTheme in core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php
Tests the generate-theme command.

File

core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php, line 317

Class

GenerateThemeTest
Tests the generate-theme commands.

Namespace

Drupal\BuildTests\Command

Code

protected function doTestDevSnapshot() : void {
  $this->setVersion('9.4.0-dev');
  $process = $this->generateThemeFromStarterkit();
  $result = $process->run();
  $this->assertStringContainsString('Theme generated successfully to themes/test_custom_theme', trim($process->getOutput()), $process->getErrorOutput());
  $this->assertSame(0, $result);
  $theme_path_relative = 'themes/test_custom_theme';
  $info = $this->assertThemeExists($theme_path_relative);
  self::assertArrayNotHasKey('hidden', $info);
  self::assertArrayHasKey('generator', $info);
  self::assertMatchesRegularExpression('/^starterkit_theme\\:9.4.0-dev#[0-9a-f]+$/', $info['generator']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.