Issue #3389286 by quietone: Fix spelling of words only misspelled in tests, part 2
parent
c57ea2f9d5
commit
987548947c
|
@ -18,7 +18,6 @@ ajaxing
|
|||
akiko
|
||||
allwords
|
||||
alphadecimal
|
||||
alterjs
|
||||
alternatif
|
||||
amet
|
||||
amphibius
|
||||
|
@ -132,8 +131,6 @@ bodyvalue
|
|||
boing
|
||||
bomofo
|
||||
bonacieux
|
||||
boskoop
|
||||
boskop
|
||||
bovigo
|
||||
breezer
|
||||
brion
|
||||
|
@ -343,7 +340,6 @@ drivertext
|
|||
dropbutton
|
||||
dropbuttons
|
||||
drudbal
|
||||
drup
|
||||
drupalci
|
||||
drupaldatetime
|
||||
drupaldevdays
|
||||
|
@ -368,7 +364,6 @@ drush
|
|||
drépal
|
||||
détruire
|
||||
editables
|
||||
editunblock
|
||||
eerste
|
||||
egulias
|
||||
eins
|
||||
|
@ -437,7 +432,6 @@ fieldsets
|
|||
filelist
|
||||
filemime
|
||||
filesort
|
||||
filestorage
|
||||
filesystems
|
||||
filetransfer
|
||||
filevalidationerror
|
||||
|
@ -454,7 +448,6 @@ fooalert
|
|||
foobarbaz
|
||||
foobargorilla
|
||||
foofoo
|
||||
foos
|
||||
formattable
|
||||
formvalidation
|
||||
fouc
|
||||
|
@ -743,7 +736,6 @@ negotiatiors
|
|||
newcol
|
||||
newfieldinitial
|
||||
newnode
|
||||
newstr
|
||||
newterm
|
||||
newwin
|
||||
nids
|
||||
|
@ -891,8 +883,6 @@ presetname
|
|||
pretransaction
|
||||
preuninstall
|
||||
processlist
|
||||
projecta
|
||||
projectb
|
||||
proname
|
||||
prophesize
|
||||
prophesized
|
||||
|
@ -973,7 +963,6 @@ revlog
|
|||
revpub
|
||||
ribisi
|
||||
ritchie
|
||||
rolename
|
||||
roly
|
||||
routable
|
||||
routeable
|
||||
|
@ -1033,7 +1022,6 @@ somemodule
|
|||
someschema
|
||||
somethinggeneric
|
||||
sortablejs
|
||||
sourcedir
|
||||
sourceediting
|
||||
spacebar
|
||||
spagna
|
||||
|
@ -1136,7 +1124,6 @@ tagstack
|
|||
tagwords
|
||||
takeshita
|
||||
tappable
|
||||
targetdir
|
||||
tarz
|
||||
taskless
|
||||
tatou
|
||||
|
|
|
@ -46,14 +46,14 @@ class SearchTextProcessorTest extends KernelTestBase {
|
|||
// \Drupal\search\SearchTextProcessorInterface::analyze().
|
||||
$start = 0;
|
||||
while ($start < mb_strlen($string)) {
|
||||
$newstr = mb_substr($string, $start, 30);
|
||||
$new_string = mb_substr($string, $start, 30);
|
||||
// Special case: leading zeros are removed from numeric strings,
|
||||
// and there's one string in this file that is numbers starting with
|
||||
// zero, so prepend a 1 on that string.
|
||||
if (preg_match('/^[0-9]+$/', $newstr)) {
|
||||
$newstr = '1' . $newstr;
|
||||
if (preg_match('/^[0-9]+$/', $new_string)) {
|
||||
$new_string = '1' . $new_string;
|
||||
}
|
||||
$strings[] = $newstr;
|
||||
$strings[] = $new_string;
|
||||
$start += 30;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -251,9 +251,9 @@ function common_test_page_attachments_alter(array &$page) {
|
|||
*/
|
||||
function common_test_js_alter(&$javascript, AttachedAssetsInterface $assets, LanguageInterface $language) {
|
||||
// Attach alter.js above tableselect.js.
|
||||
$alterjs = \Drupal::service('extension.list.module')->getPath('common_test') . '/alter.js';
|
||||
if (array_key_exists($alterjs, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) {
|
||||
$javascript[$alterjs]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1;
|
||||
$alter_js = \Drupal::service('extension.list.module')->getPath('common_test') . '/alter.js';
|
||||
if (array_key_exists($alter_js, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) {
|
||||
$javascript[$alter_js]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,23 +79,23 @@ class FileTransferTest extends BrowserTestBase {
|
|||
|
||||
// This convoluted piece of code is here because our testing framework does
|
||||
// not support expecting exceptions.
|
||||
$gotit = FALSE;
|
||||
$got_it = FALSE;
|
||||
try {
|
||||
$this->testConnection->copyDirectory($source, sys_get_temp_dir());
|
||||
}
|
||||
catch (FileTransferException $e) {
|
||||
$gotit = TRUE;
|
||||
$got_it = TRUE;
|
||||
}
|
||||
$this->assertTrue($gotit, 'Was not able to copy a directory outside of the jailed area.');
|
||||
$this->assertTrue($got_it, 'Was not able to copy a directory outside of the jailed area.');
|
||||
|
||||
$gotit = TRUE;
|
||||
$got_it = TRUE;
|
||||
try {
|
||||
$this->testConnection->copyDirectory($source, $this->root . '/' . PublicStream::basePath());
|
||||
}
|
||||
catch (FileTransferException $e) {
|
||||
$gotit = FALSE;
|
||||
$got_it = FALSE;
|
||||
}
|
||||
$this->assertTrue($gotit, 'Was able to copy a directory inside of the jailed area');
|
||||
$this->assertTrue($got_it, 'Was able to copy a directory inside of the jailed area');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,15 +24,15 @@ class RetrieveFileTest extends BrowserTestBase {
|
|||
// Test 404 handling by trying to fetch a randomly named file.
|
||||
/** @var \Drupal\Core\File\FileSystemInterface $file_system */
|
||||
$file_system = \Drupal::service('file_system');
|
||||
$file_system->mkdir($sourcedir = 'public://' . $this->randomMachineName());
|
||||
$file_system->mkdir($source_dir = 'public://' . $this->randomMachineName());
|
||||
// cSpell:disable-next-line
|
||||
$filename = 'Файл для тестирования ' . $this->randomMachineName();
|
||||
$url = \Drupal::service('file_url_generator')->generateAbsoluteString($sourcedir . '/' . $filename);
|
||||
$url = \Drupal::service('file_url_generator')->generateAbsoluteString($source_dir . '/' . $filename);
|
||||
$retrieved_file = system_retrieve_file($url);
|
||||
$this->assertFalse($retrieved_file, 'Non-existent file not fetched.');
|
||||
|
||||
// Actually create that file, download it via HTTP and test the returned path.
|
||||
file_put_contents($sourcedir . '/' . $filename, 'testing');
|
||||
file_put_contents($source_dir . '/' . $filename, 'testing');
|
||||
$retrieved_file = system_retrieve_file($url);
|
||||
|
||||
// URLs could not contains characters outside the ASCII set so $filename
|
||||
|
@ -47,15 +47,15 @@ class RetrieveFileTest extends BrowserTestBase {
|
|||
$file_system->delete($retrieved_file);
|
||||
|
||||
// Test downloading file to a different location.
|
||||
$file_system->mkdir($targetdir = 'temporary://' . $this->randomMachineName());
|
||||
$retrieved_file = system_retrieve_file($url, $targetdir);
|
||||
$this->assertEquals("{$targetdir}/{$encoded_filename}", $retrieved_file, 'Sane path for downloaded file returned (temporary:// scheme).');
|
||||
$file_system->mkdir($target_dir = 'temporary://' . $this->randomMachineName());
|
||||
$retrieved_file = system_retrieve_file($url, $target_dir);
|
||||
$this->assertEquals("{$target_dir}/{$encoded_filename}", $retrieved_file, 'Sane path for downloaded file returned (temporary:// scheme).');
|
||||
$this->assertFileExists($retrieved_file);
|
||||
$this->assertEquals(7, filesize($retrieved_file), 'File size of downloaded file is correct (temporary:// scheme).');
|
||||
$file_system->delete($retrieved_file);
|
||||
|
||||
$file_system->deleteRecursive($sourcedir);
|
||||
$file_system->deleteRecursive($targetdir);
|
||||
$file_system->deleteRecursive($source_dir);
|
||||
$file_system->deleteRecursive($target_dir);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,8 +55,8 @@ class ThemeTest extends KernelTestBase {
|
|||
// theme_test_false is an implemented theme hook so \Drupal::theme() service
|
||||
// should return a string or an object that implements MarkupInterface,
|
||||
// even though the theme function itself can return anything.
|
||||
$foos = ['null' => NULL, 'false' => FALSE, 'integer' => 1, 'string' => 'foo', 'empty_string' => ''];
|
||||
foreach ($foos as $type => $example) {
|
||||
$types = ['null' => NULL, 'false' => FALSE, 'integer' => 1, 'string' => 'foo', 'empty_string' => ''];
|
||||
foreach ($types as $type => $example) {
|
||||
$output = \Drupal::theme()->render('theme_test_foo', ['foo' => $example]);
|
||||
$this->assertTrue($output instanceof MarkupInterface || is_string($output), new FormattableMarkup('\Drupal::theme() returns an object that implements MarkupInterface or a string for data type @type.', ['@type' => $type]));
|
||||
if ($output instanceof MarkupInterface) {
|
||||
|
|
|
@ -433,25 +433,25 @@ class UpdateSemverCoreTest extends UpdateSemverTestBase {
|
|||
* Tests that exactly one fetch task per project is created and not more.
|
||||
*/
|
||||
public function testFetchTasks() {
|
||||
$projecta = [
|
||||
$project_a = [
|
||||
'name' => 'aaa_update_test',
|
||||
];
|
||||
$projectb = [
|
||||
$project_b = [
|
||||
'name' => 'bbb_update_test',
|
||||
];
|
||||
$queue = \Drupal::queue('update_fetch_tasks');
|
||||
$this->assertEquals(0, $queue->numberOfItems(), 'Queue is empty');
|
||||
update_create_fetch_task($projecta);
|
||||
update_create_fetch_task($project_a);
|
||||
$this->assertEquals(1, $queue->numberOfItems(), 'Queue contains one item');
|
||||
update_create_fetch_task($projectb);
|
||||
update_create_fetch_task($project_b);
|
||||
$this->assertEquals(2, $queue->numberOfItems(), 'Queue contains two items');
|
||||
// Try to add a project again.
|
||||
update_create_fetch_task($projecta);
|
||||
update_create_fetch_task($project_a);
|
||||
$this->assertEquals(2, $queue->numberOfItems(), 'Queue still contains two items');
|
||||
|
||||
// Clear storage and try again.
|
||||
update_storage_clear();
|
||||
update_create_fetch_task($projecta);
|
||||
update_create_fetch_task($project_a);
|
||||
$this->assertEquals(2, $queue->numberOfItems(), 'Queue contains two items');
|
||||
}
|
||||
|
||||
|
|
|
@ -143,15 +143,15 @@ class UserAdminTest extends BrowserTestBase {
|
|||
$this->assertSession()->elementExists('xpath', static::getLinkSelectorForUser($user_c));
|
||||
|
||||
// Test unblocking of a user from /admin/people page and sending of activation mail
|
||||
$editunblock = [];
|
||||
$editunblock['action'] = 'user_unblock_user_action';
|
||||
$editunblock['user_bulk_form[4]'] = TRUE;
|
||||
$edit_unblock = [];
|
||||
$edit_unblock['action'] = 'user_unblock_user_action';
|
||||
$edit_unblock['user_bulk_form[4]'] = TRUE;
|
||||
$this->drupalGet('admin/people', [
|
||||
// Sort the table by username so that we know reliably which user will be
|
||||
// targeted with the blocking action.
|
||||
'query' => ['order' => 'name', 'sort' => 'asc'],
|
||||
]);
|
||||
$this->submitForm($editunblock, 'Apply to selected items');
|
||||
$this->submitForm($edit_unblock, 'Apply to selected items');
|
||||
$user_storage->resetCache([$user_c->id()]);
|
||||
$account = $user_storage->load($user_c->id());
|
||||
$this->assertTrue($account->isActive(), 'User C unblocked');
|
||||
|
|
|
@ -27,29 +27,29 @@ class HandlerFieldRoleTest extends UserTestBase {
|
|||
|
||||
public function testRole() {
|
||||
// Create a couple of roles for the view.
|
||||
$rolename_a = 'a' . $this->randomMachineName(8);
|
||||
$this->drupalCreateRole(['access content'], $rolename_a, '<em>' . $rolename_a . '</em>', 9);
|
||||
$role_name_a = 'a' . $this->randomMachineName(8);
|
||||
$this->drupalCreateRole(['access content'], $role_name_a, '<em>' . $role_name_a . '</em>', 9);
|
||||
|
||||
$rolename_b = 'b' . $this->randomMachineName(8);
|
||||
$this->drupalCreateRole(['access content'], $rolename_b, $rolename_b, 8);
|
||||
$role_name_b = 'b' . $this->randomMachineName(8);
|
||||
$this->drupalCreateRole(['access content'], $role_name_b, $role_name_b, 8);
|
||||
|
||||
$rolename_not_assigned = $this->randomMachineName(8);
|
||||
$this->drupalCreateRole(['access content'], $rolename_not_assigned, $rolename_not_assigned);
|
||||
$role_name_not_assigned = $this->randomMachineName(8);
|
||||
$this->drupalCreateRole(['access content'], $role_name_not_assigned, $role_name_not_assigned);
|
||||
|
||||
// Add roles to user 1.
|
||||
$user = User::load(1);
|
||||
$user->addRole($rolename_a);
|
||||
$user->addRole($rolename_b);
|
||||
$user->addRole($role_name_a);
|
||||
$user->addRole($role_name_b);
|
||||
$user->save();
|
||||
|
||||
$this->drupalLogin($this->createUser(['access user profiles']));
|
||||
$this->drupalGet('/test-views-handler-field-role');
|
||||
// Verify that the view test_views_handler_field_role renders role assigned
|
||||
// to user in the correct order and markup in role names is escaped.
|
||||
$this->assertSession()->responseContains($rolename_b . Html::escape('<em>' . $rolename_a . '</em>'));
|
||||
$this->assertSession()->responseContains($role_name_b . Html::escape('<em>' . $role_name_a . '</em>'));
|
||||
// Verify that the view test_views_handler_field_role does not render a role
|
||||
// not assigned to a user.
|
||||
$this->assertSession()->pageTextNotContains($rolename_not_assigned);
|
||||
$this->assertSession()->pageTextNotContains($role_name_not_assigned);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ class FieldDropbuttonTest extends ViewsKernelTestBase {
|
|||
]);
|
||||
$this->node2 = $this->createNode([
|
||||
'type' => 'foo',
|
||||
'title' => 'foos',
|
||||
'title' => 'foo',
|
||||
'status' => 1,
|
||||
'uid' => $admin->id(),
|
||||
'created' => REQUEST_TIME - 5,
|
||||
|
|
|
@ -39,19 +39,19 @@ class WorkspaceBypassTest extends BrowserTestBase {
|
|||
$this->createContentType(['type' => 'test', 'label' => 'Test']);
|
||||
$this->setupWorkspaceSwitcherBlock();
|
||||
|
||||
$ditka = $this->drupalCreateUser(array_merge($permissions, ['create test content']));
|
||||
$coach = $this->drupalCreateUser(array_merge($permissions, ['create test content']));
|
||||
|
||||
// Login as a limited-access user and create a workspace.
|
||||
$this->drupalLogin($ditka);
|
||||
$this->drupalLogin($coach);
|
||||
$bears = $this->createWorkspaceThroughUi('Bears', 'bears');
|
||||
$this->switchToWorkspace($bears);
|
||||
|
||||
// Now create a node in the Bears workspace, as the owner of that workspace.
|
||||
$ditka_bears_node = $this->createNodeThroughUi('Ditka Bears node', 'test');
|
||||
$ditka_bears_node_id = $ditka_bears_node->id();
|
||||
$coach_bears_node = $this->createNodeThroughUi('Ditka Bears node', 'test');
|
||||
$coach_bears_node_id = $coach_bears_node->id();
|
||||
|
||||
// Editing both nodes should be possible.
|
||||
$this->drupalGet('/node/' . $ditka_bears_node_id . '/edit');
|
||||
$this->drupalGet('/node/' . $coach_bears_node_id . '/edit');
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
|
||||
// Create a new user that should be able to edit anything in the Bears
|
||||
|
@ -63,7 +63,7 @@ class WorkspaceBypassTest extends BrowserTestBase {
|
|||
|
||||
// Editor 2 has the bypass permission but does not own the workspace and so,
|
||||
// should not be able to create and edit any node.
|
||||
$this->drupalGet('/node/' . $ditka_bears_node_id . '/edit');
|
||||
$this->drupalGet('/node/' . $coach_bears_node_id . '/edit');
|
||||
$this->assertSession()->statusCodeEquals(403);
|
||||
}
|
||||
|
||||
|
|
|
@ -207,9 +207,9 @@ class ConfigFileContentTest extends KernelTestBase {
|
|||
];
|
||||
|
||||
// Encode and write, and reload and decode the configuration data.
|
||||
$filestorage = new FileStorage(Settings::get('config_sync_directory'));
|
||||
$filestorage->write($name, $config_data);
|
||||
$config_parsed = $filestorage->read($name);
|
||||
$file_storage = new FileStorage(Settings::get('config_sync_directory'));
|
||||
$file_storage->write($name, $config_data);
|
||||
$config_parsed = $file_storage->read($name);
|
||||
|
||||
$key = 'numeric keys';
|
||||
$this->assertSame($config_data[$key], $config_parsed[$key]);
|
||||
|
|
|
@ -47,10 +47,10 @@ class HtmlEscapedTextTest extends TestCase {
|
|||
$tests[] = [$script_tag, '<script>', 'Escapes <script> even inside an object that implements MarkupInterface.'];
|
||||
$tests[] = ["<script>", '<script>', 'Escapes <script>'];
|
||||
$tests[] = ['<>&"\'', '<>&"'', 'Escapes reserved HTML characters.'];
|
||||
$specialchars = $prophet->prophesize(MarkupInterface::class);
|
||||
$specialchars->__toString()->willReturn('<>&"\'');
|
||||
$specialchars = $specialchars->reveal();
|
||||
$tests[] = [$specialchars, '<>&"'', 'Escapes reserved HTML characters even inside an object that implements MarkupInterface.'];
|
||||
$special_chars = $prophet->prophesize(MarkupInterface::class);
|
||||
$special_chars->__toString()->willReturn('<>&"\'');
|
||||
$special_chars = $special_chars->reveal();
|
||||
$tests[] = [$special_chars, '<>&"'', 'Escapes reserved HTML characters even inside an object that implements MarkupInterface.'];
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
|
|
@ -300,6 +300,7 @@ class HtmlTest extends TestCase {
|
|||
['→', '→'],
|
||||
['➼', '➼'],
|
||||
['€', '€'],
|
||||
// cspell:disable-next-line
|
||||
['Drup<75>al', "Drup\x80al"],
|
||||
];
|
||||
}
|
||||
|
|
|
@ -155,16 +155,16 @@ class EntityTypeRepositoryTest extends UnitTestCase {
|
|||
* @covers ::getEntityTypeFromClass
|
||||
*/
|
||||
public function testGetEntityTypeFromClassAmbiguous() {
|
||||
$boskoop = $this->prophesize(EntityTypeInterface::class);
|
||||
$boskoop->getOriginalClass()->willReturn('\Drupal\apple\Entity\Apple');
|
||||
$boskoop->id()->willReturn('boskop');
|
||||
$jazz = $this->prophesize(EntityTypeInterface::class);
|
||||
$jazz->getOriginalClass()->willReturn('\Drupal\apple\Entity\Apple');
|
||||
$jazz->id()->willReturn('jazz');
|
||||
|
||||
$gala = $this->prophesize(EntityTypeInterface::class);
|
||||
$gala->getOriginalClass()->willReturn('\Drupal\apple\Entity\Apple');
|
||||
$gala->id()->willReturn('gala');
|
||||
|
||||
$this->setUpEntityTypeDefinitions([
|
||||
'boskoop' => $boskoop,
|
||||
'jazz' => $jazz,
|
||||
'gala' => $gala,
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue