Commit fdc1c3da authored by alexpott's avatar alexpott

Issue #2383863 by rpayanm, mgifford, maximpodorov, Valentine94: Spellchecking Drupal - Comments

parent f0c731f2
......@@ -11,7 +11,7 @@
use Drupal\views\ResultRow;
/**
* Filters htmls tags from item.
* Filters HTML tags from item.
*
* @ingroup views_field_handlers
*
......
......@@ -76,7 +76,7 @@ protected function setUp() {
* plugins that extend AggregatorPluginSettingsBase.
*/
public function testSettingsForm() {
// Emulate a form state of a sumbitted form.
// Emulate a form state of a submitted form.
$form_state = (new FormState())->setValues([
'dummy_length' => '',
'aggregator_allowed_html_tags' => '',
......
......@@ -11,7 +11,7 @@
use Drupal\block\Entity\Block;
/**
* Tests if a block can be configure to be only visibile on a particular
* Tests if a block can be configured to be only visible on a particular
* language.
*
* @group block
......
......@@ -60,7 +60,7 @@ public function testImport() {
}
/**
* Tests determing changes in hook_block_presave().
* Tests determining changes in hook_block_presave().
*
* Verifies the static block load cache is cleared upon save.
*/
......@@ -78,8 +78,8 @@ public function testDeterminingChanges() {
$block->save();
// The hook implementations block_content_test_block_content_presave() and
// block_content_test_block_content_update() determine changes and change the
// title as well as programatically set the 'changed' timestamp.
// block_content_test_block_content_update() determine changes and change
// the title as well as programmatically set the 'changed' timestamp.
$this->assertEqual($block->label(), 'updated_presave_update', 'Changes have been determined.');
$this->assertEqual($block->getChangedTime(), 979534800, 'Saving a custom block uses "changed" timestamp set in presave hook.');
......
......@@ -57,7 +57,7 @@ public function testBlockContentTypeCreation() {
]));
// Now create an initial block-type.
$this->createBlockContentType('basic', TRUE);
// Create a block type programmaticaly.
// Create a block type programmatically.
$type = $this->createBlockContentType('other');
$block_type = BlockContentType::load('other');
......
......@@ -212,7 +212,7 @@ function commentContactInfoAvailable() {
* Comment to perform operation on.
* @param string $operation
* Operation to perform.
* @param bool $aproval
* @param bool $approval
* Operation is found on approval page.
*/
function performCommentOperation($comment, $operation, $approval = FALSE) {
......
......@@ -337,7 +337,7 @@ function commentContactInfoAvailable() {
* Comment to perform operation on.
* @param string $operation
* Operation to perform.
* @param bool $aproval
* @param bool $approval
* Operation is found on approval page.
*/
function performCommentOperation(CommentInterface $comment, $operation, $approval = FALSE) {
......
......@@ -127,7 +127,7 @@ function testCommentThreading() {
/**
* Asserts that the link to the specified parent comment is present.
*
* @parm int $cid
* @param int $cid
* The comment ID to check.
* @param int $pid
* The expected parent comment ID.
......@@ -154,7 +154,7 @@ protected function assertParentLink($cid, $pid) {
/**
* Asserts that the specified comment does not have a link to a parent.
*
* @parm int $cid
* @param int $cid
* The comment ID to check.
*/
protected function assertNoParentLink($cid) {
......
......@@ -2,7 +2,7 @@
/**
* @file
* Dummy module emptying comment titles to test for approriate and accessible
* Dummy module emptying comment titles to test for appropriate and accessible
* markup in edge case scenarios where comments have empty titles.
*/
......
......@@ -173,7 +173,7 @@ function testCRUD() {
$this->fail($e->getMessage());
}
// Test with an ID exeeding the maximum allowed length.
// Test with an ID exceeding the maximum allowed length.
$id_length_config_test = entity_create('config_test', array(
'id' => $this->randomMachineName(static::MAX_ID_LENGTH + 1),
));
......
......@@ -243,7 +243,7 @@ public function testExportImportCollections() {
$this->assertEqual($data, array('foo' => 'baz'), 'The config_test.another_update in collection.test2 exists in the snapshot storage.');
$this->assertFalse($test2_snapshot->read('config_test.another_create'), 'The config_test.another_create in collection.test2 does not exist in the snapshot storage.');
// Create the tar contains the expected contect for the collections.
// Create the tar that contains the expected content for the collections.
$tar = new ArchiveTar($filename, 'gz');
$content_list = $tar->listContent();
// Convert the list of files into something easy to search.
......
......@@ -310,7 +310,7 @@ function testImportDiff() {
}
/**
* Tests that mutliple validation errors are listed on the page.
* Tests that multiple validation errors are listed on the page.
*/
public function testImportValidation() {
// Set state value so that
......
......@@ -186,7 +186,7 @@ public function testCollectionInstallationCollectionConfigEntity() {
$this->assertEqual($collections, $active_storage->getAllCollectionNames());
$collection_storage = $active_storage->createCollection('entity');
// The config_test.dynamic.dotted.default configuraton object saved in the
// The config_test.dynamic.dotted.default configuration object saved in the
// active store should be a configuration entity complete with UUID. Because
// the entity collection does not support configuration entities the
// configuration object stored there with the same name should only contain
......
......@@ -39,7 +39,7 @@ function testSiteNameTranslation() {
$adminUser = $this->drupalCreateUser(array('administer site configuration', 'administer languages'));
$this->drupalLogin($adminUser);
// Add a custom lanugage.
// Add a custom language.
$langcode = 'xx';
$name = $this->randomMachineName(16);
$edit = array(
......
......@@ -111,7 +111,7 @@ function testConfOverride() {
$this->assertFalse(isset($data['baz']));
$this->assertIdentical($data['404'], $expected_new_data['404']);
// Verifiy the overrides are still working.
// Verify that the overrides are still working.
$config = \Drupal::config('config_test.system');
$this->assertIdentical($config->get('foo'), $overrides['config_test.system']['foo']);
$this->assertIdentical($config->get('baz'), $overrides['config_test.system']['baz']);
......
......@@ -114,7 +114,7 @@ public function isPersonal();
* Returns the user this message is being sent to.
*
* @return \Drupal\user\UserInterface
* The user entity of the recipent, NULL if this is not a personal message.
* The user entity of the recipient, NULL if this is not a personal message.
*/
public function getPersonalRecipient();
......
......@@ -273,7 +273,7 @@ function content_translation_form_alter(array &$form, FormStateInterface $form_s
/**
* Implements hook_language_fallback_candidates_OPERATION_alter().
*
* Performs language fallback for unaccessible translations.
* Performs language fallback for inaccessible translations.
*/
function content_translation_language_fallback_candidates_entity_view_alter(&$candidates, $context) {
/** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
......
......@@ -205,11 +205,11 @@ function testAccountLanguageSettingsUI() {
* Asserts that translatability has the expected value for the given bundle.
*
* @param string $entity_type
* The entity type for which to check translatibility.
* The entity type for which to check translatability.
* @param string $bundle
* The bundle for which to check translatibility.
* The bundle for which to check translatability.
* @param bool $enabled
* TRUE if translatibility should be enabled, FALSE otherwise.
* TRUE if translatability should be enabled, FALSE otherwise.
* @param array $edit
* An array of values to submit to the content translation settings page.
*
......
......@@ -25,14 +25,14 @@ class ContentTranslationSyncUnitTest extends KernelTestBase {
protected $synchronizer;
/**
* The colums to be synchronized.
* The columns to be synchronized.
*
* @var array
*/
protected $synchronized;
/**
* All the field colums.
* All the field columns.
*
* @var array
*/
......
......@@ -83,7 +83,7 @@ function testWorkflows() {
$expected_status = array('edit' => 200, 'overview' => 200, 'add_translation' => 200, 'edit_translation' => 200);
$this->assertWorkflows($this->administrator, $expected_status);
// Check that translation permissions governate the associated operations.
// Check that translation permissions allow the associated operations.
$ops = array('create' => t('Add'), 'update' => t('Edit'), 'delete' => t('Delete'));
$translations_url = $this->entity->urlInfo('drupal:content-translation-overview');
foreach ($ops as $current_op => $item) {
......
......@@ -15,7 +15,7 @@
/**
* Generate events and verify dblog entries; verify user access to log reports
* based on persmissions.
* based on permissions.
*
* @group dblog
*/
......
......@@ -41,7 +41,7 @@ public static function filterXss($html, FilterFormatInterface $format, FilterFor
// embedded, hence ensuring the same origin policy always applies.
$dangerous_tags = array('script', 'style', 'link', 'embed', 'object');
// Simply blacklisting these five dangerious tags would bring safety, but
// Simply blacklisting these five dangerous tags would bring safety, but
// also user frustration: what if a text format is configured to allow
// <embed>, for example? Then we would strip that tag, even though it is
// allowed, thereby causing data loss!
......
......@@ -181,7 +181,7 @@ public function providerTestFilterXss() {
// Escaping JavaScript escapes.
// @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#Escaping_JavaScript_escapes
// This one is irrelevent for Drupal; we *never* output any JavaScript code
// This one is irrelevant for Drupal; we *never* output any JavaScript code
// that depends on the URL's query string.
// End title tag.
......@@ -200,7 +200,7 @@ public function providerTestFilterXss() {
// @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#IMG_Dynsrc
$data[] = array('<IMG DYNSRC="javascript:alert(\'XSS\')">', '<IMG dynsrc="alert(&#039;XSS&#039;)">');
// IMG lowrsc.
// IMG lowsrc.
// @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#IMG_lowsrc
$data[] = array('<IMG LOWSRC="javascript:alert(\'XSS\')">', '<IMG lowsrc="alert(&#039;XSS&#039;)">');
......
......@@ -126,7 +126,7 @@ protected function setUp() {
}
/**
* Assert unaccessible items don't change the data of the fields.
* Assert inaccessible items don't change the data of the fields.
*/
public function testAccess() {
// Revoke the 'view test entity' permission for this test.
......
......@@ -257,7 +257,7 @@ function testFieldFormUnlimited() {
$this->assertFieldByName("{$field_name}[0][value]", '', 'Widget 1 is displayed');
$this->assertFieldByName("{$field_name}[1][value]", '', 'New widget is displayed');
$this->assertNoField("{$field_name}[2][value]", 'No extraneous widget is displayed');
// TODO : check that non-field inpurs are preserved ('title')...
// TODO : check that non-field inputs are preserved ('title')...
// Yet another time so that we can play with more values -> 3 widgets.
$this->drupalPostForm(NULL, array(), t('Add another item'));
......
......@@ -270,7 +270,7 @@ public function _testMultipleFieldRender() {
}
$view->destroy();
// Test delta limit + custom seperator.
// Test delta limit + custom separator.
$this->prepareView($view);
$view->displayHandlers->get('default')->options['fields'][$field_name]['delta_first_last'] = FALSE;
$view->displayHandlers->get('default')->options['fields'][$field_name]['delta_limit'] = 3;
......
......@@ -90,7 +90,7 @@ public function testEntityDisplayCRUD() {
$display = entity_load('entity_view_display', $display->id());
$this->assertNULL($display->getComponent('component_3'));
// Check that CreateCopy() creates a new component that can be correclty
// Check that createCopy() creates a new component that can be correctly
// saved.
EntityViewMode::create(array('id' => $display->getTargetEntityTypeId() . '.other_view_mode', 'targetEntityType' => $display->getTargetEntityTypeId()))->save();
$new_display = $display->createCopy('other_view_mode');
......
......@@ -498,7 +498,7 @@ function testDisallowedFieldNames() {
*/
function testLockedField() {
// Create a locked field and attach it to a bundle. We need to do this
// programatically as there's no way to create a locked field through UI.
// programmatically as there's no way to create a locked field through UI.
$field_name = strtolower($this->randomMachineName(8));
$field_storage = entity_create('field_storage_config', array(
'field_name' => $field_name,
......
......@@ -77,28 +77,28 @@ public function getViewsData() {
'field' => 'fid',
'left_field' => 'fid',
),
// Link ourself to the {node_field_data} table
// Link ourselves to the {node_field_data} table
// so we can provide node->file relationships.
'node_field_data' => array(
'field' => 'id',
'left_field' => 'nid',
'extra' => array(array('field' => 'type', 'value' => 'node')),
),
// Link ourself to the {users_field_data} table
// Link ourselves to the {users_field_data} table
// so we can provide user->file relationships.
'users_field_data' => array(
'field' => 'id',
'left_field' => 'uid',
'extra' => array(array('field' => 'type', 'value' => 'user')),
),
// Link ourself to the {comment_field_data} table
// Link ourselves to the {comment_field_data} table
// so we can provide comment->file relationships.
'comment' => array(
'field' => 'id',
'left_field' => 'cid',
'extra' => array(array('field' => 'type', 'value' => 'comment')),
),
// Link ourself to the {taxonomy_term_field_data} table
// Link ourselves to the {taxonomy_term_field_data} table
// so we can provide taxonomy_term->file relationships.
'taxonomy_term_data' => array(
'field' => 'id',
......
......@@ -547,7 +547,7 @@ function _filter_url($text, $filter) {
// 2. Used in IIS sessions like /S(dfd346)/
$valid_url_balanced_parens = '\('. $valid_url_path_characters . '+\)';
// Valid end-of-path chracters (so /foo. does not gobble the period).
// Valid end-of-path characters (so /foo. does not gobble the period).
// 1. Allow =&# for empty URL parameters and other URL-join artifacts
$valid_url_ending_characters = '[\p{L}\p{M}\p{N}:_+~#=/]|(?:' . $valid_url_balanced_parens . ')';
......@@ -711,7 +711,7 @@ function _filter_url_escape_comments($match, $escape = NULL) {
return;
}
// Replace all HTML coments with a '<!-- [hash] -->' placeholder.
// Replace all HTML comments with a '<!-- [hash] -->' placeholder.
if ($mode) {
$content = $match[1];
$hash = hash('sha256', $content);
......
......@@ -11,7 +11,7 @@
use Drupal\filter\Plugin\FilterBase;
/**
* Provides a filter to conver line breaks to HTML.
* Provides a filter to convert line breaks to HTML.
*
* @Filter(
* id = "filter_autop",
......
......@@ -12,7 +12,7 @@
use Drupal\Component\Utility\Xss;
/**
* Provides a test filter to restirct HTML tags and attributes.
* Provides a test filter to restrict HTML tags and attributes.
*
* @Filter(
* id = "filter_test_restrict_tags_and_attributes",
......
......@@ -563,7 +563,7 @@ function createForumTopic($forum, $container = FALSE) {
* @param $admin
* Boolean to indicate whether the user can 'access administration pages'.
* @param $response
* The exptected HTTP response code.
* The expected HTTP response code.
*/
private function verifyForums(EntityInterface $node, $admin, $response = 200) {
$response2 = ($admin) ? 200 : 403;
......
......@@ -27,7 +27,7 @@ class HistoryTest extends WebTestBase {
/**
* The main user for testing.
*
* @var objec
* @var object
*/
protected $user;
......
......@@ -20,7 +20,7 @@
* may contain the following elements:
* - name: The human-readable language type identifier.
* - description: A description of the language type.
* - locked: A boolean indicating if the user can choose wether to configure
* - locked: A boolean indicating if the user can choose whether to configure
* the language type or not using the UI.
* - fixed: A fixed array of language negotiation method identifiers to use to
* initialize this language. If locked is set to TRUE and fixed is set, it
......
......@@ -50,7 +50,7 @@ public function setCurrentUser(AccountInterface $current_user);
* initialized yet.
*
* @return string
* A valid language code or FALSE if the negotitation was unsuccessful.
* A valid language code or FALSE if the negotiation was unsuccessful.
*/
public function getLangcode(Request $request = NULL);
......
......@@ -59,7 +59,7 @@
* - URL: Determine the language from the URL (path prefix or domain).
* - Session: Determine the language from a request/session parameter.
* - User: Follow the user's language preference.
* - User admin language: Identifie admin language from the user preferences.
* - User admin language: Identify admin language from the user preferences.
* - Browser: Determine the language from the browser's language settings.
* - Selected language: Use the default site language.
* Language negotiation methods are simple plugin classes that implement a
......
......@@ -148,7 +148,7 @@ function testDomainNameNegotiationPort() {
$this->assertEqual($url, $expected, 'The right port is used.');
// If we set the port explicitly, it should not be overriden.
// If we set the port explicitly, it should not be overridden.
$url = Url::fromRoute('<none>', [], [
'absolute' => TRUE,
'language' => $language,
......
......@@ -93,7 +93,7 @@ public function testDomain($http_host, $domains, $expected_langcode) {
* Provides data for the domain test.
*
* @return array
* An array of data for checking domain negotation.
* An array of data for checking domain negotiation.
*/
public function providerTestDomain() {
......
......@@ -291,7 +291,7 @@ function locale_translate_batch_import_save(array $context) {
/**
* Implements callback_batch_operation().
*
* Refreshs translations after importing strings.
* Refreshes translations after importing strings.
*
* @param array $context
* Contains a list of strings updated and information about the progress.
......@@ -460,7 +460,7 @@ function locale_translate_file_attach_properties($file, array $options = array()
// Extract project, version and language code from the file name. Supported:
// {project}-{version}.{langcode}.po, {prefix}.{langcode}.po or {langcode}.po
preg_match('!
( # project OR project and version OR emtpy (group 1)
( # project OR project and version OR empty (group 1)
([a-z_]+) # project name (group 2)
\. # .
| # OR
......
......@@ -208,7 +208,7 @@ function locale_translation_source_check_file($source) {
* - "type": Most recent translation source found. LOCALE_TRANSLATION_REMOTE
* and LOCALE_TRANSLATION_LOCAL indicate available new translations,
* LOCALE_TRANSLATION_CURRENT indicate that the current translation is them
* most recent. "type" sorresponds with a key of the "files" array.
* most recent. "type" corresponds with a key of the "files" array.
* - "timestamp": The creation time of the "type" translation (file).
* - "last_checked": The time when the "type" translation was last checked.
* The "files" array can hold file objects of type:
......
......@@ -456,7 +456,7 @@ protected function dbStringSelect(array $conditions, array $options = array()) {
}
/**
* Createds a database record for a string object.
* Creates a database record for a string object.
*
* @param \Drupal\locale\StringInterface $string
* The string object.
......@@ -466,7 +466,7 @@ protected function dbStringSelect(array $conditions, array $options = array()) {
* If it succeeded returns the last insert ID of the query, if one exists.
*
* @throws \Drupal\locale\StringStorageException
* If the string is not suitable for this storage, an exception ithrown.
* If the string is not suitable for this storage, an exception is thrown.
*/
protected function dbStringInsert($string) {
if ($string->isSource()) {
......
......@@ -56,8 +56,8 @@ public function getTranslations(array $conditions = array(), array $options = ar
*
* @param array $conditions
* (optional) Array with conditions to filter the locations that may be any
* of the follwing elements:
* - 'sid', The tring identifier.
* of the following elements:
* - 'sid', The string identifier.
* - 'type', The location type.
* - 'name', The location name.
*
......
......@@ -65,7 +65,7 @@ public function testUpdateCron() {
);
$this->drupalPostForm('admin/config/regional/translate/settings', $edit, t('Save configuration'));
// Execute locale cron taks to add tasks to the queue.
// Execute locale cron tasks to add tasks to the queue.
locale_cron();
// Check whether no tasks are added to the queue.
......@@ -80,7 +80,7 @@ public function testUpdateCron() {
);
$this->drupalPostForm('admin/config/regional/translate/settings', $edit, t('Save configuration'));
// Execute locale cron taks to add tasks to the queue.
// Execute locale cron tasks to add tasks to the queue.
locale_cron();
// Check whether tasks are added to the queue.
......
......@@ -36,7 +36,7 @@ protected function setUp() {
* Tests the user interfaces of the interface translation update system.
*
* Testing the Available updates summary on the side wide status page and the
* Avaiable translation updates page.
* Available translation updates page.
*/
public function testInterface() {
// No language added.
......
......@@ -124,7 +124,7 @@ protected function getEntity() {
if (!empty($this->pluginDefinition['metadata']['entity_id'])) {
$entity_id = $this->pluginDefinition['metadata']['entity_id'];
// Make sure the current ID is in the list, since each plugin empties
// the list after calling loadMultple(). Note that the list may include
// the list after calling loadMultiple(). Note that the list may include
// multiple IDs added earlier in each plugin's constructor.
static::$entityIdsToLoad[$entity_id] = $entity_id;
$entities = $storage->loadMultiple(array_values(static::$entityIdsToLoad));
......
......@@ -161,7 +161,7 @@ function testMenuLinkReparenting($module = 'menu_test') {
$this->assertMenuLinkParents($links, $expected_hierarchy);
// Start over, and move child-1 under child-2, and check that all the
// childs of child-1 have been moved too.
// children of child-1 have been moved too.
$links = $this->createLinkHierarchy($module);
/* @var \Drupal\Core\Menu\MenuLinkInterface $menu_link_plugin */
$this->menuLinkManager->updateDefinition($links['child-1'], array('parent' => $links['child-2']));
......
......@@ -22,7 +22,7 @@ abstract class MenuWebTestBase extends WebTestBase {
public static $modules = array('menu_ui', 'menu_link_content');
/**
* Fetchs the menu item from the database and compares it to expected item.
* Fetches the menu item from the database and compares it to expected item.
*
* @param int $menu_plugin_id
* Menu item id.
......
......@@ -166,7 +166,7 @@ public function query() {
* Tweaks Drupal6SqlBase to set a new database connection for tests.
*
* @param \Drupal\Core\Database\Connection
* The new conection to use.
* The new connection to use.
*
* @see \Drupal\Tests\migrate\Unit\MigrateSqlTestCase
*/
......
......@@ -65,7 +65,7 @@
* called.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The acccount object whose grants are requested.
* The account object whose grants are requested.
* @param string $op
* The node operation to be performed, such as 'view', 'update', or 'delete'.
*
......
......@@ -133,7 +133,8 @@ function testNodeRevisionAccessPerType() {
'account' => $accounts,
);
// Test that the accounts have access to the correspoding page revision permissions.
// Test that the accounts have access to the corresponding page revision
// permissions.
$revision = $this->node_revisions['page'][1];
$permutations = $this->generatePermutations($parameters);
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\node\Tests\NodeTypeInitalLanguageTest.
* Definition of Drupal\node\Tests\NodeTypeInitialLanguageTest.
*/
namespace Drupal\node\Tests;
......
......@@ -47,7 +47,7 @@ function testNodeTypeGetFunctions() {
* Tests creating a content type programmatically and via a form.
*/
function testNodeTypeCreation() {
// Create a content type programmaticaly.
// Create a content type programmatically.
$type = $this->drupalCreateContentType();
$type_exists = (bool) NodeType::load($type->id());
......
......@@ -64,7 +64,7 @@ function testUpdateAllowedValues() {
$this->fieldStorage->setSetting('allowed_values', [10 => 'Update', 20 => 'Twenty']);
$this->fieldStorage->save();
// The entity holds an outdated field object with the old allowed values
// setting, so we need to reintialize the entity object.
// setting, so we need to reinitialize the entity object.
$entity = entity_create('entity_test');
$form = \Drupal::service('entity.form_builder')->getForm($entity);
$this->assertTrue(empty($form[$this->fieldName]['widget'][1]), 'Option 1 does not exist');
......
......@@ -124,7 +124,7 @@ function testAdminAlias() {
$edit['source'] = 'node/' . $node1->id();
$alias = $this->randomMachineName(128);
$edit['alias'] = $alias;
// The alias is shortened to 50 characters counting the elipsis.
// The alias is shortened to 50 characters counting the ellipsis.
$truncated_alias = substr($alias, 0, 47);
$this->drupalPostForm('admin/config/search/path/add', $edit, t('Save'));
$this->assertNoText($alias, 'The untruncated alias was not found.');
......
......@@ -244,7 +244,7 @@ public function collectRoutes(RouteCollection $collection) {
// REST exports should only respond to get methods.
$requirements = array('_method' => 'GET');
// Format as a string using pipes as a delimeter.
// Format as a string using pipes as a delimiter.
$requirements['_format'] = implode('|', $style_plugin->getFormats());
// Add the new requirements to the route.
......