function GenerateThemeTest::doTestNoEditMissingFilesWarning
Same name and namespace in other branches
- main core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php \Drupal\BuildTests\Command\GenerateThemeTest::doTestNoEditMissingFilesWarning()
1 call to GenerateThemeTest::doTestNoEditMissingFilesWarning()
- GenerateThemeTest::testInvalidThemesAndWarnings in core/
tests/ Drupal/ BuildTests/ Command/ GenerateThemeTest.php
File
-
core/
tests/ Drupal/ BuildTests/ Command/ GenerateThemeTest.php, line 534
Class
- GenerateThemeTest
- Tests the generate-theme commands.
Namespace
Drupal\BuildTests\CommandCode
protected function doTestNoEditMissingFilesWarning() : void {
$this->writeStarterkitConfig([
'no_edit' => [
'/js/starterkit_theme.js',
],
'no_rename' => NULL,
]);
$tester = $this->runCommand([
'machine-name' => 'test_custom_theme',
'--name' => 'Test custom starterkit theme',
'--description' => 'Custom theme generated from a starterkit theme',
]);
self::assertThat($tester->getStatusCode(), self::logicalNot(new CommandIsSuccessful()), trim($tester->getDisplay()));
self::assertEquals('[ERROR] Paths were defined `no_edit` but no files found.', trim($tester->getErrorOutput()));
$theme_path_absolute = $this->getWorkspaceDirectory() . '/themes/test_custom_theme';
self::assertDirectoryDoesNotExist($theme_path_absolute);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.