Commit 94ca9bc3 authored by xjm's avatar xjm

Issue #2972224 by alexpott, longwave, jungle, sja112, xjm, dww, daffie,...

Issue #2972224 by alexpott, longwave, jungle, sja112, xjm, dww, daffie, kiamlaluno, dawehner, quietone, Lendude: Add .cspell.json to automate spellchecking in Drupal core
parent 29b2451c
{
"version": "0.1",
"language": "en-US",
"allowCompoundWords": false,
"ignorePaths": [
"assets/vendor/**",
"lib/Drupal/Component/Diff/**",
"lib/Drupal/Component/Transliteration/data/**",
"lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php",
"modules/**/Migrate*Test.php",
"modules/color/preview.html",
"modules/color/tests/modules/color_test/themes/color_test_theme/color/preview.html",
"modules/migrate_drupal/tests/fixtures/drupal6.php",
"modules/migrate_drupal/tests/fixtures/drupal7.php",
"modules/search/tests/UnicodeTest.txt",
"modules/system/tests/logo.svgz",
"node_modules/*",
"profiles/demo_umami/modules/demo_umami_content/default_content/languages/es/**/*",
"themes/bartik/color/preview.html",
"COPYRIGHT.txt",
"MAINTAINERS.txt",
"package.json",
"yarn.lock",
"misc/cspell/dictionary.txt"
],
"ignoreRegExpList": [
"^msgstr .*",
"!!binary .*",
"%[0-9][0-9A-F]"
],
"dictionaries": ["drupal","companies", "fonts", "html", "php", "softwareTerms"],
"dictionaryDefinitions": [
{ "name": "drupal", "path": "./misc/cspell/dictionary.txt"}
],
"flagWords": [
"hte"
],
"overrides": [
{
"filename": "**/{*.engine,*.inc,*.install,*.module,*.profile,*.theme}",
"languageId": "php"
},
{
"filename": "**/scripts/{*.php.txt, *.sh}",
"languageId": "php"
}
]
}
......@@ -192,6 +192,7 @@ public function object($size = 4) {
* Nonsense latin words which form sentence(s).
*/
public function sentences($min_word_count, $capitalize = FALSE) {
// cSpell:disable
$dictionary = ["abbas", "abdo", "abico", "abigo", "abluo", "accumsan",
"acsi", "ad", "adipiscing", "aliquam", "aliquip", "amet", "antehabeo",
"appellatio", "aptent", "at", "augue", "autem", "bene", "blandit",
......@@ -223,6 +224,7 @@ public function sentences($min_word_count, $capitalize = FALSE) {
"virtus", "voco", "volutpat", "vulpes", "vulputate", "wisi", "ymo",
"zelus",
];
// cSpell:enable
$dictionary_flipped = array_flip($dictionary);
$greeking = '';
......
......@@ -229,6 +229,7 @@ public static function getStandardLanguageList() {
// The "Left-to-right marker" comments and the enclosed UTF-8 markers are to
// make otherwise strange looking PHP syntax natural (to not be displayed in
// right to left). See https://www.drupal.org/node/128866#comment-528929.
// cSpell:disable
return [
'af' => ['Afrikaans', 'Afrikaans'],
'am' => ['Amharic', 'አማርኛ'],
......@@ -326,6 +327,7 @@ public static function getStandardLanguageList() {
'zh-hans' => ['Chinese, Simplified', '简体中文'],
'zh-hant' => ['Chinese, Traditional', '繁體中文'],
];
// cSpell:enable
}
/**
......@@ -340,6 +342,7 @@ public static function getStandardLanguageList() {
* names as values.
*/
public static function getUnitedNationsLanguageList() {
// cSpell:disable
return [
'ar' => ['Arabic', /* Left-to-right marker "‭" */ 'العربية', LanguageInterface::DIRECTION_RTL],
'zh-hans' => ['Chinese, Simplified', '简体中文'],
......@@ -348,6 +351,7 @@ public static function getUnitedNationsLanguageList() {
'ru' => ['Russian', 'Русский'],
'es' => ['Spanish', 'Español'],
];
// cSpell:enable
}
/**
......
......@@ -37,6 +37,7 @@ public function __construct(ModuleHandlerInterface $module_handler) {
* An array of country code => country name pairs.
*/
public static function getStandardList() {
// cSpell:disable
$countries = [
'AC' => t('Ascension Island'),
'AD' => t('Andorra'),
......@@ -297,6 +298,7 @@ public static function getStandardList() {
'ZM' => t('Zambia'),
'ZW' => t('Zimbabwe'),
];
// cSpell:enable
// Sort the list.
natcasesort($countries);
......
This diff is collapsed.
......@@ -819,6 +819,7 @@ public function testTemporaryUser() {
*/
public function testOverviewLinks() {
$this->drupalLogin($this->adminUser);
// cSpell:disable-next-line
$this->generateLogEntries(1, ['message' => "&lt;script&gt;alert('foo');&lt;/script&gt;<strong>Lorem</strong> ipsum dolor sit amet, consectetur adipiscing & elit."]);
$this->drupalGet('admin/reports/dblog');
$this->assertSession()->statusCodeEquals(200);
......
......@@ -115,6 +115,7 @@ public function testFileCreateUrl() {
// Characters that look like a percent-escaped string.
"%23%25%26%2B%2F%3F" .
// Characters from various non-ASCII alphabets.
// cSpell:disable-next-line
"éøïвβ中國書۞";
$basename_encoded = '%20-._~%21%24%27%22%28%29%2A%40%5B%5D%3F%26%2B%25%23%2C%3B%3D%3A__' .
'%2523%2525%2526%252B%252F%253F' .
......
......@@ -183,6 +183,7 @@ public function createUri($filepath = NULL, $contents = NULL, $scheme = NULL) {
if (!isset($filepath)) {
// Prefix with non-latin characters to ensure that all file-related
// tests work with international filenames.
// cSpell:disable-next-line
$filepath = 'Файл для тестирования ' . $this->randomMachineName();
}
if (!isset($scheme)) {
......
......@@ -37,6 +37,7 @@ public function testFileTokenReplacement() {
$test_file = $this->getTestFile('text');
// Coping a file to test uploads with non-latin filenames.
// cSpell:disable-next-line
$filename = \Drupal::service('file_system')->dirname($test_file->getFileUri()) . '/текстовый файл.txt';
$test_file = file_copy($test_file, $filename);
......
......@@ -196,6 +196,7 @@ public function createUri($filepath = NULL, $contents = NULL, $scheme = NULL) {
if (!isset($filepath)) {
// Prefix with non-latin characters to ensure that all file-related
// tests work with international filenames.
// cSpell:disable-next-line
$filepath = 'Файл для тестирования ' . $this->randomMachineName();
}
if (!isset($scheme)) {
......
......@@ -44,6 +44,7 @@ public function testWithFilename() {
$contents = $this->randomMachineName(8);
// Using filename with non-latin characters.
// cSpell:disable-next-line
$filename = 'Текстовый файл.txt';
$result = file_save_data($contents, 'public://' . $filename);
......
......@@ -323,6 +323,7 @@ public function testLineBreakFilter() {
// Since the line break filter naturally needs plenty of newlines in test
// strings and expectations, we're using "\n" instead of regular newlines
// here.
// cSpell:disable
$tests = [
// Single line breaks should be changed to <br /> tags, while paragraphs
// separated with double line breaks should be enclosed with <p></p> tags.
......@@ -381,6 +382,7 @@ public function testLineBreakFilter() {
'<p><drupal-media data-caption=" " data-entity-type="media" data-entity-uuid="dbb16f97-cd11-4357-acde-cd09e19e312b"></drupal-media></p>' => FALSE,
],
];
// cSpell:enable
$this->assertFilteredString($filter, $tests);
// Very long string hitting PCRE limits.
......@@ -1023,8 +1025,10 @@ public function testHtmlCorrectorFilter() {
$f = Html::normalize('<p>test\n</p>\n');
$this->assertEqual($f, '<p>test\n</p>\n', 'HTML corrector -- New-lines are accepted and kept as-is.');
// cSpell:disable
$f = Html::normalize('<p>دروبال');
$this->assertEqual($f, '<p>دروبال</p>', 'HTML corrector -- Encoding is correctly kept.');
// cSpell:enable
$f = Html::normalize('<script>alert("test")</script>');
$this->assertEqual($f, '<script>
......
......@@ -74,6 +74,7 @@ protected function canonicalizeUri($uri) {
// and &#x00FF; (except × &#x00D7; and ÷ &#x00F7;) with the addition of
// &#x0152;, &#x0153; and &#x0178;.
// @see https://git.drupalcode.org/project/link/blob/7.x-1.5-beta2/link.module#L1382
// cSpell:disable-next-line
$link_ichars = '¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿŒœŸ';
// Pattern specific to internal links.
......
......@@ -50,6 +50,7 @@ public function providerValidate() {
// Test allowed protocols.
$data[] = ['http://www.drupal.org', TRUE];
$data[] = ['https://www.drupal.org', TRUE];
// cSpell:disable-next-line
$data[] = ['magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C', TRUE];
// Invalid protocols.
......
......@@ -74,6 +74,7 @@ public function testConfigTranslationImport() {
// Check if configuration translations have been imported.
$override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'system.maintenance');
// cSpell:disable-next-line
$this->assertEqual($override->get('message'), 'Ons is tans besig met onderhoud op @site. Wees asseblief geduldig, ons sal binnekort weer terug wees.');
}
......
......@@ -291,11 +291,13 @@ public function testConfigPoFile() {
$config_strings = [
'system.maintenance' => [
'@site is currently under maintenance. We should be back shortly. Thank you for your patience.',
// cSpell:disable-next-line
'@site karbantartás alatt áll. Rövidesen visszatérünk. Köszönjük a türelmet.',
'message',
],
'user.role.anonymous' => [
'Anonymous user',
// cSpell:disable-next-line
'Névtelen felhasználó',
'label',
],
......
......@@ -56,6 +56,7 @@ protected function installParameters() {
*/
public function testInstallerTranslations() {
$this->drupalGet('user/login');
// cSpell:disable-next-line
$this->assertSession()->responseContains('Geben sie das Passwort für ihren Benutzernamen ein.');
}
......
......@@ -150,6 +150,7 @@ public function testUpdateImportSourceRemote() {
$this->assertEqual($history['contrib_module_three']['de']->last_checked, $this->timestampMedium, 'Translation of contrib_module_three is not updated');
// Check whether existing translations have (not) been overwritten.
// cSpell:disable
$this->assertEqual(t('January', [], ['langcode' => 'de']), 'Januar_1', 'Translation of January');
$this->assertEqual(t('February', [], ['langcode' => 'de']), 'Februar_2', 'Translation of February');
$this->assertEqual(t('March', [], ['langcode' => 'de']), 'Marz_2', 'Translation of March');
......@@ -157,6 +158,7 @@ public function testUpdateImportSourceRemote() {
$this->assertEqual(t('May', [], ['langcode' => 'de']), 'Mai_customized', 'Translation of May');
$this->assertEqual(t('June', [], ['langcode' => 'de']), 'Juni', 'Translation of June');
$this->assertEqual(t('Monday', [], ['langcode' => 'de']), 'Montag', 'Translation of Monday');
// cSpell:enable
}
/**
......@@ -204,6 +206,7 @@ public function testUpdateImportSourceLocal() {
$this->assertEqual($history['contrib_module_three']['de']->last_checked, $this->timestampMedium, 'Translation of contrib_module_three is not updated');
// Check whether existing translations have (not) been overwritten.
// cSpell:disable
$this->assertEqual(t('January', [], ['langcode' => 'de']), 'Januar_customized', 'Translation of January');
$this->assertEqual(t('February', [], ['langcode' => 'de']), 'Februar_2', 'Translation of February');
$this->assertEqual(t('March', [], ['langcode' => 'de']), 'Marz_2', 'Translation of March');
......@@ -211,6 +214,7 @@ public function testUpdateImportSourceLocal() {
$this->assertEqual(t('May', [], ['langcode' => 'de']), 'Mai_customized', 'Translation of May');
$this->assertEqual(t('June', [], ['langcode' => 'de']), 'Juni', 'Translation of June');
$this->assertEqual(t('Monday', [], ['langcode' => 'de']), 'Montag', 'Translation of Monday');
// cSpell:enable
}
/**
......@@ -240,6 +244,7 @@ public function testUpdateImportModeNonCustomized() {
$this->drupalPostForm('admin/reports/translations', [], t('Update translations'));
// Check whether existing translations have (not) been overwritten.
// cSpell:disable
$this->assertEqual(t('January', [], ['langcode' => 'de']), 'Januar_customized', 'Translation of January');
$this->assertEqual(t('February', [], ['langcode' => 'de']), 'Februar_customized', 'Translation of February');
$this->assertEqual(t('March', [], ['langcode' => 'de']), 'Marz_2', 'Translation of March');
......@@ -247,6 +252,7 @@ public function testUpdateImportModeNonCustomized() {
$this->assertEqual(t('May', [], ['langcode' => 'de']), 'Mai_customized', 'Translation of May');
$this->assertEqual(t('June', [], ['langcode' => 'de']), 'Juni', 'Translation of June');
$this->assertEqual(t('Monday', [], ['langcode' => 'de']), 'Montag', 'Translation of Monday');
// cSpell:enable
}
/**
......@@ -276,6 +282,7 @@ public function testUpdateImportModeNone() {
$this->drupalPostForm('admin/reports/translations', [], t('Update translations'));
// Check whether existing translations have (not) been overwritten.
// cSpell:disable
$this->assertTranslation('January', 'Januar_customized', 'de');
$this->assertTranslation('February', 'Februar_customized', 'de');
$this->assertTranslation('March', 'Marz', 'de');
......@@ -283,6 +290,7 @@ public function testUpdateImportModeNone() {
$this->assertTranslation('May', 'Mai_customized', 'de');
$this->assertTranslation('June', 'Juni', 'de');
$this->assertTranslation('Monday', 'Montag', 'de');
// cSpell:enable
}
/**
......@@ -304,6 +312,7 @@ public function testEnableUninstallModule() {
// Check if translations have been imported.
$this->assertRaw(t('One translation file imported. %number translations were added, %update translations were updated and %delete translations were removed.',
['%number' => 7, '%update' => 0, '%delete' => 0]), 'One translation file imported.');
// cSpell:disable-next-line
$this->assertTranslation('Tuesday', 'Dienstag', 'de');
$edit = [
......@@ -338,6 +347,7 @@ public function testEnableLanguage() {
// Check if there is no Dutch translation yet.
$this->assertTranslation('Extraday', '', 'nl');
// cSpell:disable-next-line
$this->assertTranslation('Tuesday', 'Dienstag', 'de');
// Add a language.
......@@ -349,6 +359,7 @@ public function testEnableLanguage() {
// Check if the right number of translations are added.
$this->assertRaw(t('One translation file imported. %number translations were added, %update translations were updated and %delete translations were removed.',
['%number' => 8, '%update' => 0, '%delete' => 0]), 'One language added.');
// cSpell:disable-next-line
$this->assertTranslation('Extraday', 'extra dag', 'nl');
// Check if the language data is added to the database.
......@@ -365,6 +376,7 @@ public function testEnableLanguage() {
// Check that the Dutch translation is gone.
$this->assertTranslation('Extraday', '', 'nl');
// cSpell:disable-next-line
$this->assertTranslation('Tuesday', 'Dienstag', 'de');
}
......
......@@ -134,6 +134,7 @@ public function testResolveCacheMissWithoutFallback() {
*/
public function testResolveCacheMissWithFallback($langcode, $string, $context, $expected) {
// These are fake words!
// cSpell:disable
$translations = [
'en' => [
'test' => 'test',
......@@ -153,6 +154,7 @@ public function testResolveCacheMissWithFallback($langcode, $string, $context, $
'missing pl' => 'chybějící pl',
],
];
// cSpell:enable
$this->storage->expects($this->any())
->method('findTranslation')
->will($this->returnCallback(function ($argument) use ($translations) {
......@@ -189,6 +191,7 @@ public function testResolveCacheMissWithFallback($langcode, $string, $context, $
* Provides test data for testResolveCacheMissWithFallback().
*/
public function resolveCacheMissWithFallbackProvider() {
// cSpell:disable
return [
['cs', 'test', 'irrelevant', 'test v české'],
['cs', 'fake', 'irrelevant', 'falešný'],
......@@ -203,6 +206,7 @@ public function resolveCacheMissWithFallbackProvider() {
['pl', 'missing cs', 'irrelevant', 'zaginiony czech'],
['pl', 'missing both', 'irrelevant', 'missing both'],
];
// cSpell:enable
}
/**
......
......@@ -667,6 +667,7 @@ public function testAlt() {
$assert_session->elementAttributeContains('named', ['field', 'attributes[alt]'], 'placeholder', 'default alt');
// Fill in the alt field, submit and return to CKEditor.
// cSpell:disable-next-line
$who_is_zartan = 'Zartan is the leader of the Dreadnoks.';
$page->fillField('attributes[alt]', $who_is_zartan);
$this->submitDialog();
......@@ -793,6 +794,7 @@ public function testTranslationAlt() {
$host->save();
$translation = $host->addTranslation('fr');
// cSpell:disable-next-line
$translation->title = 'Animaux avec des noms étranges';
$translation->body->value = $host->body->value;
$translation->body->format = $host->body->format;
......@@ -810,16 +812,20 @@ public function testTranslationAlt() {
$this->getSession()->switchToIFrame('ckeditor');
// Test that the default alt attribute displays without an override.
// cSpell:disable-next-line
$this->assertNotEmpty($assert_session->waitForElementVisible('xpath', '//img[contains(@alt, "texte alternatif par défaut")]'));
// Test `aria-label` attribute appears on the widget wrapper.
// cSpell:disable-next-line
$assert_session->elementExists('css', '.cke_widget_drupalmedia[aria-label="Tatou poilu hurlant"]');
$page->pressButton('Edit media');
$this->waitForMetadataDialog();
// Assert that the placeholder is set to the value of the media field's
// alt text.
// cSpell:disable-next-line
$assert_session->elementAttributeContains('named', ['field', 'attributes[alt]'], 'placeholder', 'texte alternatif par défaut');
// Fill in the alt field in the dialog.
// cSpell:disable-next-line
$qui_est_zartan = 'Zartan est le chef des Dreadnoks.';
$page->fillField('attributes[alt]', $qui_est_zartan);
$this->submitDialog();
......
......@@ -81,12 +81,14 @@ protected function setUp(): void {
$image->save();
// Create a translated and untranslated media item in each language.
// cSpell:disable
$media_items = [
['nl' => 'Eekhoorn', 'es' => 'Ardilla'],
['es' => 'Zorro', 'nl' => 'Vos'],
['nl' => 'Hert'],
['es' => 'Tejón'],
];
// cSpell:enable
foreach ($media_items as $translations) {
$default_langcode = key($translations);
$default_name = array_shift($translations);
......@@ -131,6 +133,7 @@ public function testMediaLibraryTranslations() {
$media_names[] = $media_item->getText();
}
sort($media_names);
// cSpell:disable-next-line
$this->assertSame(['Ardilla', 'Eekhoorn', 'Hert', 'Tejón', 'Vos', 'Zorro'], $media_names);
$this->drupalGet('es/admin/content/media-grid');
......@@ -141,6 +144,7 @@ public function testMediaLibraryTranslations() {
$media_names[] = $media_item->getText();
}
sort($media_names);
// cSpell:disable-next-line
$this->assertSame(['Ardilla', 'Eekhoorn', 'Hert', 'Tejón', 'Vos', 'Zorro'], $media_names);
// All media should only be shown once, and should be shown in the interface
......@@ -155,6 +159,7 @@ public function testMediaLibraryTranslations() {
$media_names[] = $media_item->getText();
}
sort($media_names);
// cSpell:disable-next-line
$this->assertSame(['Eekhoorn', 'Hert', 'Tejón', 'Vos'], $media_names);
$this->drupalGet('es/node/add/article');
......@@ -167,6 +172,7 @@ public function testMediaLibraryTranslations() {
$media_names[] = $media_item->getText();
}
sort($media_names);
// cSpell:disable-next-line
$this->assertSame(['Ardilla', 'Hert', 'Tejón', 'Zorro'], $media_names);
}
......
......@@ -82,6 +82,7 @@ public function testSummaryLength() {
// Create a node to view.
$settings = [
// cSpell:disable-next-line
'body' => [['value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vitae arcu at leo cursus laoreet. Curabitur dui tortor, adipiscing malesuada tempor in, bibendum ac diam. Cras non tellus a libero pellentesque condimentum. What is a Drupalism? Suspendisse ac lacus libero. Ut non est vel nisl faucibus interdum nec sed leo. Pellentesque sem risus, vulputate eu semper eget, auctor in libero. Ut fermentum est vitae metus convallis scelerisque. Phasellus pellentesque rhoncus tellus, eu dignissim purus posuere id. Quisque eu fringilla ligula. Morbi ullamcorper, lorem et mattis egestas, tortor neque pretium velit, eget eleifend odio turpis eu purus. Donec vitae metus quis leo pretium tincidunt a pulvinar sem. Morbi adipiscing laoreet mauris vel placerat. Nullam elementum, nisl sit amet scelerisque malesuada, dolor nunc hendrerit quam, eu ultrices erat est in orci. Curabitur feugiat egestas nisl sed accumsan.']],
'promote' => 1,
];
......
......@@ -111,6 +111,7 @@ public function testAdminAlias() {
// currently unable to find the upper-case versions of non-ASCII
// characters.
// @todo fix this in https://www.drupal.org/node/2607432
// cSpell:disable-next-line
$edit['alias[0][value]'] .= "ïвβéø";
}
$this->drupalPostForm('admin/config/search/path/edit/' . $pid, $edit, t('Save'));
......@@ -266,6 +267,7 @@ public function testNodeAlias() {
// currently unable to find the upper-case versions of non-ASCII
// characters.
// @todo fix this in https://www.drupal.org/node/2607432
// cSpell:disable-next-line
$edit['path[0][alias]'] .= "ïвβéø";
}
$this->drupalPostForm('node/' . $node1->id() . '/edit', $edit, t('Save'));
......
......@@ -57,6 +57,7 @@ public function providerTestSerialization() {
'default' => [NULL, ''],
'empty string' => [''],
'simple string' => ['string'],
// cSpell:disable-next-line
'complex string' => ['Complex \ string $%^&@ with unicode ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΣὨ'],
'empty array' => [[]],
'numeric array' => [['test']],
......
......@@ -44,6 +44,7 @@ protected function setUp(): void {
* Tests that search returns results with diacritics in the search phrase.
*/
public function testPhraseSearchPunctuation() {
// cSpell:disable
$body_text = 'The Enricþment Center is cómmīŦŧęđ to the well BɆĬŇĜ of æll påŔťıçȉpǎǹţș. ';
$body_text .= 'Also meklēt (see #731298)';
$this->drupalCreateNode(['body' => [['value' => $body_text]]]);
......@@ -89,6 +90,7 @@ public function testPhraseSearchPunctuation() {
$edit = ['keys' => 'all'];
$this->drupalPostForm('search/node', $edit, t('Search'));
$this->assertNoRaw('<strong>æll</strong>');
// cSpell:enable
}
}
......@@ -44,6 +44,7 @@ protected function setUp(): void {
*/
public function testPhraseSearchPunctuation() {
$node = $this->drupalCreateNode(['body' => [['value' => "The bunny's ears were fluffy."]]]);
// cSpell:disable-next-line
$node2 = $this->drupalCreateNode(['body' => [['value' => 'Dignissim Aliquam &amp; Quieligo meus natu quae quia te. Damnum&copy; erat&mdash; neo pneum. Facilisi feugiat ibidem ratis.']]]);
// Update the search index.
......
......@@ -77,8 +77,10 @@ public function testSearchExcerpt() {
public function testSearchExcerptSimplified() {
$start_time = microtime(TRUE);
// cSpell:disable
$lorem1 = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vitae arcu at leo cursus laoreet. Curabitur dui tortor, adipiscing malesuada tempor in, bibendum ac diam. Cras non tellus a libero pellentesque condimentum. What is a Drupalism? Suspendisse ac lacus libero. Ut non est vel nisl faucibus interdum nec sed leo. Pellentesque sem risus, vulputate eu semper eget, auctor in libero.';
$lorem2 = 'Ut fermentum est vitae metus convallis scelerisque. Phasellus pellentesque rhoncus tellus, eu dignissim purus posuere id. Quisque eu fringilla ligula. Morbi ullamcorper, lorem et mattis egestas, tortor neque pretium velit, eget eleifend odio turpis eu purus. Donec vitae metus quis leo pretium tincidunt a pulvinar sem. Morbi adipiscing laoreet mauris vel placerat. Nullam elementum, nisl sit amet scelerisque malesuada, dolor nunc hendrerit quam, eu ultrices erat est in orci.';
// cSpell:enable
// Make some text with some keywords that will get simplified.
$text = $lorem1 . ' Number: 123456.7890 Hyphenated: one-two abc,def ' . $lorem2;
......
......@@ -36,6 +36,7 @@ menu_test.exotic_path:
route_name: menu_test.exotic_path
# "Special" ASCII characters. Characters that look like a percent-escaped
# string. Characters from various non-ASCII alphabets.
# cSpell:disable-next-line
route_parameters: { exotic: ' -._~!$''"()*@[]?&+%#,;=:%23%25%26%2B%2F%3Féøïвβ中國書۞' }
# Hidden tests; base parents.
# Same structure as in Menu and Block modules. Since those structures can
......
......@@ -381,6 +381,7 @@ menu_test.exotic_path:
# "Special" ASCII characters, characters that look like a percent-escaped
# string, and characters from various non-ASCII alphabets.
# @todo Find a way to use the correct path.
# cSpell:disable-next-line
#path: "/menu-test/ -._~!$'\"()*@[]?&+%#,;=:%23%25%26%2B%2F%3Féøïвβ中國書۞"
path: '/menu-test/{exotic}'
defaults:
......
......@@ -198,6 +198,7 @@ protected function doTestExoticPath() {
// Characters that look like a percent-escaped string.
"%23%25%26%2B%2F%3F" .
// Characters from various non-ASCII alphabets.
// cSpell:disable-next-line
"éøïвβ中國書۞";
$this->drupalGet($path);
$this->assertRaw('This is the menuTestCallback content.');
......
......@@ -24,6 +24,7 @@ public function testFileRetrieving() {
/** @var \Drupal\Core\File\FileSystemInterface $file_system */
$file_system = \Drupal::service('file_system');
$file_system->mkdir($sourcedir = 'public://' . $this->randomMachineName());
// cSpell:disable-next-line
$filename = 'Файл для тестирования ' . $this->randomMachineName();
$url = file_create_url($sourcedir . '/' . $filename);
$retrieved_file = system_retrieve_file($url);
......
......@@ -301,8 +301,10 @@ public function testUpdatedSite() {
// Make sure strings are still translated.
$this->drupalGet('admin/structure/views/view/content/translate/es/edit');
// cSpell:disable-next-line
$this->assertText('Contenido');
$this->drupalPostForm('admin/config/regional/translate', ['string' => 'Full comment'], 'Filter');
// cSpell:disable-next-line
$this->assertText('Comentario completo');
// Make sure our custom action is still there.
......
......@@ -51,6 +51,7 @@ public function testFirstSentenceQuestion() {
*/
public function testLongSentence() {
// 125.
// cSpell:disable
$text =
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ' .
// 108.
......@@ -62,6 +63,7 @@ public function testLongSentence() {
$expected = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ' .
'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ' .
'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.';
// cSpell:enable
// First three sentences add up to: 336, so add one for space and then 3 to get half-way into next word.
$this->assertTextSummary($text, $expected, NULL, 340);
}
......
......@@ -41,9 +41,11 @@ public function testUserProfileValues() {
$user = User::load(2);
$this->assertNotNull($user);
$this->assertIdentical('red', $user->profile_color->value);
// cSpell:disable
$expected = <<<EOT
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nulla sapien, congue nec risus ut, adipiscing aliquet felis. Maecenas quis justo vel nulla varius euismod. Quisque metus metus, cursus sit amet sem non, bibendum vehicula elit. Cras dui nisl, eleifend at iaculis vitae, lacinia ut felis. Nullam aliquam ligula volutpat nulla consectetur accumsan. Maecenas tincidunt molestie diam, a accumsan enim fringilla sit amet. Morbi a tincidunt tellus. Donec imperdiet scelerisque porta. Sed quis sem bibendum eros congue sodales. Vivamus vel fermentum est, at rutrum orci. Nunc consectetur purus ut dolor pulvinar, ut volutpat felis congue. Cras tincidunt odio sed neque sollicitudin, vehicula tempor metus scelerisque.
EOT;
// cSpell:enable
$this->assertIdentical($expected, $user->profile_biography->value);
$this->assertIdentical('1', $user->profile_sell_address->value);
$this->assertIdentical('Back\slash', $user->profile_sold_to->value);
......
......@@ -41,6 +41,7 @@ protected function setUp(): void {
* Tests user name validation.
*/
public function testUsernames() {
// cSpell:disable
$test_cases = [
// '<username>' => ['<description>', 'assert<testName>'].