Commit ac3b7662 authored by xjm's avatar xjm

Issue #2383871 by mgifford, rpayanm, a_thakur, maximpodorov, AohRveTPV,...

Issue #2383871 by mgifford, rpayanm, a_thakur, maximpodorov, AohRveTPV, jhodgdon: Spellchecking Drupal - PHP
parent 088f8b35
......@@ -64,7 +64,7 @@ public function testBlockContentTypeCreation() {
$this->assertTrue($block_type, 'The new block type has been created.');
$this->drupalGet('block/add/' . $type->id());
$this->assertResponse(200, 'The new block type can be accessed at bloack/add.');
$this->assertResponse(200, 'The new block type can be accessed at block/add.');
// Create a block type via the user interface.
$edit = array(
......
......@@ -26,7 +26,7 @@ class LlamaButton extends Llama implements CKEditorPluginButtonsInterface {
function getButtons() {
return array(
'Llama' => array(
'label' => t('Insert Lllama'),
'label' => t('Insert Llama'),
),
);
}
......
......@@ -72,7 +72,7 @@ public function testInstallOtherModuleFirst() {
/**
* Tests enabling the provider of the config entity type first.
*/
public function testInstallConfigEnityModuleFirst() {
public function testInstallConfigEntityModuleFirst() {
$this->installModule('config_test');
$this->assertFalse(entity_load('config_test', 'other_module_test', TRUE), 'Default configuration provided by config_other_module_config_test does not exist.');
......
......@@ -227,7 +227,7 @@ function testSchemaMapping() {
$definition = \Drupal::service('config.typed')->getDefinition('config_schema_test.someschema.somemodule.section_one.subsection');
// This should be the schema of config_schema_test.someschema.somemodule.*.*.
$expected = array();
$expected['label'] = 'Schema multiple filesytem marker test';
$expected['label'] = 'Schema multiple filesystem marker test';
$expected['class'] = '\Drupal\Core\Config\Schema\Mapping';
$expected['mapping']['langcode']['type'] = 'string';
$expected['mapping']['langcode']['label'] = 'Language code';
......
......@@ -65,7 +65,7 @@ config_schema_test.someschema.with_parents.key_3:
config_schema_test.someschema.somemodule.*.*:
type: config_object
label: 'Schema multiple filesytem marker test'
label: 'Schema multiple filesystem marker test'
mapping:
testid:
type: string
......
......@@ -392,7 +392,7 @@ function testDefaultValue() {
// Check that invalid default values are rejected.
$edit = array($element_name => '-1');
$this->drupalPostForm($admin_path, $edit, t('Save settings'));
$this->assertText("$field_name does not accept the value -1", 'Form vaildation failed.');
$this->assertText("$field_name does not accept the value -1", 'Form validation failed.');
// Check that the default value is saved.
$edit = array($element_name => '1');
......
......@@ -188,7 +188,7 @@ public function testBasicFieldDenormalization() {
/**
* Verifies that the denormalized entity is correct in the PATCH context.
*/
public function testPatchDenormailzation() {
public function testPatchDenormalization() {
$data = array(
'_links' => array(
'type' => array(
......
......@@ -267,7 +267,7 @@ function testUILanguageNegotiation() {
'expect' => $language_string,
'expected_method_id' => LanguageNegotiationUser::METHOD_ID,
'http_header' => array(),
'message' => 'USER > DEFAULT: defined prefereed user language setting, the UI language is based on user setting',
'message' => 'USER > DEFAULT: defined preferred user language setting, the UI language is based on user setting',
);
$this->runTest($test);
......@@ -309,7 +309,7 @@ function testUILanguageNegotiation() {
'expect' => $language_string,
'expected_method_id' => LanguageNegotiationUserAdmin::METHOD_ID,
'http_header' => array(),
'message' => 'USER ADMIN > DEFAULT: defined prefereed user admin language setting, the UI language is based on user setting',
'message' => 'USER ADMIN > DEFAULT: defined preferred user admin language setting, the UI language is based on user setting',
);
$this->runTest($test);
......
......@@ -157,7 +157,7 @@ function testDomainNameNegotiationPort() {
$expected = $index_php ? 'http://example.fr:90/index.php' : 'http://example.fr:90' . rtrim(base_path(), '/') . '/';
$this->assertEqual($url, $expected, 'A given port is not overriden.');
$this->assertEqual($url, $expected, 'A given port is not overridden.');
}
......
......@@ -72,7 +72,7 @@ public function testInterface() {
$this->assertText(t('Translation update status'), 'Status message');
$this->assertRaw(t('Updates available for: @languages. See the <a href="@updates">Available translation updates</a> page for more information.', array('@languages' => t('German'), '@updates' => \Drupal::url('locale.translate_status'))), 'Updates available message');
$this->drupalGet('admin/reports/translations');
$this->assertText(t('Updates for: @modules', array('@modules' => 'Locale test translate')), 'Translations avaiable');
$this->assertText(t('Updates for: @modules', array('@modules' => 'Locale test translate')), 'Translations available');
// Set locale_test_translate module to have a dev release and no
// translation found.
......
......@@ -37,7 +37,7 @@ public function fields() {
'format' => $this->t('Format ID.'),
'name' => $this->t('The name of the filter format.'),
'roles' => $this->t('The user roles that can use the format.'),
'cache' => $this->t('Flag to indicate whether format is cachable. (1 = cachable, 0 = not cachable).'),
'cache' => $this->t('Flag to indicate whether format is cacheable. (1 = cacheable, 0 = not cacheable).'),
);
}
......
......@@ -143,8 +143,8 @@ public function displaySubmitted() {
/**
* {@inheritdoc}
*/
public function setDisplaySubmitted($display_submtited) {
$this->display_submitted = $display_submtited;
public function setDisplaySubmitted($display_submitted) {
$this->display_submitted = $display_submitted;
}
/**
......
......@@ -52,7 +52,7 @@ public function displaySubmitted();
* @param bool $display_submitted
* TRUE if the submitted by information should be shown.
*/
public function setDisplaySubmitted($display_submtited);
public function setDisplaySubmitted($display_submitted);
/**
* Gets the preview mode.
......
......@@ -35,7 +35,7 @@ function testNodeTitleXSS() {
$this->drupalGet('node/' . $node->id());
// assertTitle() decodes HTML-entities inside the <title> element.
$this->assertTitle($title . ' | Drupal', 'Title is diplayed when viewing a node.');
$this->assertTitle($title . ' | Drupal', 'Title is displayed when viewing a node.');
$this->assertNoRaw($xss, 'Harmful tags are escaped when viewing a node.');
$this->drupalGet('node/' . $node->id() . '/edit');
......
......@@ -143,7 +143,7 @@ protected function init(FormStateInterface $form_state, EntityInterface $entity,
// Fetch the display used by the form. It is the display for the 'default'
// form mode, with only the current field visible.
$display = EntityFormDisplay::collectRenderDisplay($entity, 'default');
foreach ($display->getComponents() as $name => $optipns) {
foreach ($display->getComponents() as $name => $options) {
if ($name != $field_name) {
$display->removeComponent($name);
}
......
......@@ -44,7 +44,7 @@ protected function setUp() {
/**
* Verify the keywords are captured and conditions respected.
*/
function testSearchKeyswordsConditions() {
function testSearchKeywordsConditions() {
// No keys, not conditions - no results.
$this->drupalGet('search/dummy_path');
$this->assertNoText('Dummy search snippet to display');
......
......@@ -156,7 +156,7 @@ function simpletest_schema() {
),
);
$schema['simpletest_test_id'] = array(
'description' => 'Stores simpletest test IDs, used to auto-incrament the test ID so that a fresh test ID is used.',
'description' => 'Stores simpletest test IDs, used to auto-increment the test ID so that a fresh test ID is used.',
'fields' => array(
'test_id' => array(
'type' => 'serial',
......
......@@ -645,13 +645,13 @@ protected function assertUniqueTextHelper($text, $message = '', $group = 'Other'
if (!$message) {
$message = '"' . $text . '"' . ($be_unique ? ' found only once' : ' found more than once');
}
$first_occurance = strpos($this->getTextContent(), $text);
if ($first_occurance === FALSE) {
$first_occurrence = strpos($this->getTextContent(), $text);
if ($first_occurrence === FALSE) {
return $this->assert(FALSE, $message, $group);
}
$offset = $first_occurance + strlen($text);
$second_occurance = strpos($this->getTextContent(), $text, $offset);
return $this->assert($be_unique == ($second_occurance === FALSE), $message, $group);
$offset = $first_occurrence + strlen($text);
$second_occurrence = strpos($this->getTextContent(), $text, $offset);
return $this->assert($be_unique == ($second_occurrence === FALSE), $message, $group);
}
/**
......
......@@ -1636,7 +1636,7 @@ public function copyConfig(StorageInterface $source_storage, StorageInterface $t
}
/**
* Configuration accessor for tests. Returns non-overriden configuration.
* Configuration accessor for tests. Returns non-overridden configuration.
*
* @param $name
* Configuration name.
......
......@@ -61,11 +61,11 @@ class PerformanceForm extends ConfigFormBase {
* @param \Drupal\Core\Asset\AssetCollectionOptimizerInterface $js_collection_optimizer
* The JavaScript asset collection optimizer service.
*/
public function __construct(ConfigFactoryInterface $config_factory, CacheBackendInterface $render_cache, DateFormatter $date_formater, AssetCollectionOptimizerInterface $css_collection_optimizer, AssetCollectionOptimizerInterface $js_collection_optimizer) {
public function __construct(ConfigFactoryInterface $config_factory, CacheBackendInterface $render_cache, DateFormatter $date_formatter, AssetCollectionOptimizerInterface $css_collection_optimizer, AssetCollectionOptimizerInterface $js_collection_optimizer) {
parent::__construct($config_factory);
$this->renderCache = $render_cache;
$this->dateFormatter = $date_formater;
$this->dateFormatter = $date_formatter;
$this->cssCollectionOptimizer = $css_collection_optimizer;
$this->jsCollectionOptimizer = $js_collection_optimizer;
}
......
......@@ -288,7 +288,7 @@ function testExternalUrls() {
$url = $test_url . '#drupal';
$fragment = $this->randomMachineName(10);
$result = Url::fromUri($url, array('fragment' => $fragment))->toString();
$this->assertEqual($test_url . '#' . $fragment, $result, 'External URL fragment is overidden with a custom fragment in $options.');
$this->assertEqual($test_url . '#' . $fragment, $result, 'External URL fragment is overridden with a custom fragment in $options.');
// Verify external URL can contain a query string.
$url = $test_url . '?drupal=awesome';
......
......@@ -128,7 +128,7 @@ function testQueryFetchCol() {
$result = db_query('SELECT name FROM {test} WHERE age > :age', array(':age' => 25));
$i = 0;
foreach ($result as $record) {
$this->assertIdentical($record->name, $column[$i++], 'Column matches direct accesss.');
$this->assertIdentical($record->name, $column[$i++], 'Column matches direct access.');
}
}
......
......@@ -104,7 +104,7 @@ function testRepeatedInsert() {
/**
* Tests that we can specify fields without values and specify values later.
*/
function testInsertFieldOnlyDefinintion() {
function testInsertFieldOnlyDefinition() {
// This is useful for importers, when we want to create a query and define
// its fields once, then loop over a multi-insert execution.
db_insert('test')
......
......@@ -38,7 +38,7 @@ function testInsertDuplicateData() {
'job' => 'Singer',
))
->execute();
$this->fail('Insert succeedded when it should not have.');
$this->fail('Insert succeeded when it should not have.');
}
catch (IntegrityConstraintViolationException $e) {
// Check if the first record was inserted.
......
......@@ -226,7 +226,7 @@ function testCountQueryRemovals() {
$db_type = Database::getConnection()->databaseType();
$this->assertEqual($orderby['name'], ($db_type == 'pgsql' ? 'ASC NULLS FIRST' : 'ASC'), 'Query correctly sets ordering clause.');
$orderby = $count->getOrderBy();
$this->assertFalse(isset($orderby['name']), 'Count query correctly unsets ordering caluse.');
$this->assertFalse(isset($orderby['name']), 'Count query correctly unsets ordering clause.');
// Make sure that the count query works.
$count = $count->execute()->fetchField();
......
......@@ -124,7 +124,7 @@ function testMetaData() {
$query->addMetaData('test', $data);
$return = $query->getMetaData('test');
$this->assertEqual($data, $return, 'Corect metadata returned.');
$this->assertEqual($data, $return, 'Correct metadata returned.');
$return = $query->getMetaData('nothere');
$this->assertNull($return, 'Non-existent key returned NULL.');
......
......@@ -593,12 +593,12 @@ public function getContainedStrings(TypedDataInterface $wrapper, $depth, array &
public function testDataTypes() {
$types = \Drupal::typedDataManager()->getDefinitions();
foreach (entity_test_entity_types() as $entity_type) {
$this->assertTrue($types['entity:' . $entity_type]['class'], 'Entity data type registed.');
$this->assertTrue($types['entity:' . $entity_type]['class'], 'Entity data type registered.');
}
// Check bundle types are provided as well.
entity_test_create_bundle('bundle');
$types = \Drupal::typedDataManager()->getDefinitions();
$this->assertTrue($types['entity:entity_test:bundle']['class'], 'Entity bundle data type registed.');
$this->assertTrue($types['entity:entity_test:bundle']['class'], 'Entity bundle data type registered.');
}
/**
......
......@@ -53,7 +53,7 @@ function testForm() {
// Reset the form to the values of the storage, using a form rebuild
// triggered by button of type button.
$this->drupalPostForm(NULL, array('title' => 'changed'), 'Reset');
$this->assertFieldByName('title', 'new', 'Values have been resetted.');
$this->assertFieldByName('title', 'new', 'Values have been reset.');
// After rebuilding, the form has been cached.
$this->assertText('Form constructions: 4');
......@@ -78,7 +78,7 @@ function testFormCached() {
// Reset the form to the values of the storage, using a form rebuild
// triggered by button of type button.
$this->drupalPostForm(NULL, array('title' => 'changed'), 'Reset');
$this->assertFieldByName('title', 'new', 'Values have been resetted.');
$this->assertFieldByName('title', 'new', 'Values have been reset.');
$this->assertText('Form constructions: 3');
$this->drupalPostForm(NULL, $edit, 'Save');
......
......@@ -101,7 +101,7 @@ public function testInstallUninstall() {
// Uninstall the original module, and check appropriate
// hooks, tables, and log messages. (Later, we'll go back and do the
// same thing for modules that were enabled automatically.)
$this->assertSuccessfullUninstall($name, $package);
$this->assertSuccessfulUninstall($name, $package);
}
// Go through all modules that were automatically installed, and try to
......@@ -116,7 +116,7 @@ public function testInstallUninstall() {
$disabled_checkbox = $this->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="uninstall[' . $name . ']"]');
if (empty($disabled_checkbox)) {
$automatically_installed = array_diff($automatically_installed, array($name));
$this->assertSuccessfullUninstall($name, $package);
$this->assertSuccessfulUninstall($name, $package);
}
}
$final_count = count($automatically_installed);
......@@ -151,7 +151,7 @@ public function testInstallUninstall() {
* (optional) The package of the module to uninstall. Defaults
* to 'Core'.
*/
protected function assertSuccessfullUninstall($module, $package = 'Core') {
protected function assertSuccessfulUninstall($module, $package = 'Core') {
$edit = array();
if ($module == 'forum') {
// Forum cannot be uninstalled until all of the content entities related
......
......@@ -27,7 +27,7 @@ public static function factory() {
*/
public function getSettingsForm() {
$form = array();
$form['udpate_test_username'] = array(
$form['update_test_username'] = array(
'#type' => 'textfield',
'#title' => t('Update Test Username'),
);
......
......@@ -39,7 +39,7 @@ function testUserDeleteMultiple() {
$this->assertTrue($roles_created > 0, 'Role assignments created for new users and deletion of role assignments can be tested');
// We should be able to load one of the users.
$this->assertTrue(User::load($user_a->id()), 'User is created and deltion of user can be tested');
$this->assertTrue(User::load($user_a->id()), 'User is created and deletion of user can be tested');
// Delete the users.
user_delete_multiple($uids);
// Test if the roles assignments are deleted.
......
......@@ -254,7 +254,7 @@ function testRegistrationWithUserFields() {
// Check user fields.
$accounts = entity_load_multiple_by_properties('user', array('name' => $name, 'mail' => $mail));
$new_user = reset($accounts);
$this->assertEqual($new_user->test_user_field->value, $value, 'The field value was correclty saved.');
$this->assertEqual($new_user->test_user_field->value, $value, 'The field value was correctly saved.');
// Check that the 'add more' button works.
$field_storage->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED);
......@@ -283,9 +283,9 @@ function testRegistrationWithUserFields() {
// Check user fields.
$accounts = entity_load_multiple_by_properties('user', array('name' => $name, 'mail' => $mail));
$new_user = reset($accounts);
$this->assertEqual($new_user->test_user_field[0]->value, $value, format_string('@js : The field value was correclty saved.', array('@js' => $js)));
$this->assertEqual($new_user->test_user_field[1]->value, $value + 1, format_string('@js : The field value was correclty saved.', array('@js' => $js)));
$this->assertEqual($new_user->test_user_field[2]->value, $value + 2, format_string('@js : The field value was correclty saved.', array('@js' => $js)));
$this->assertEqual($new_user->test_user_field[0]->value, $value, format_string('@js : The field value was correctly saved.', array('@js' => $js)));
$this->assertEqual($new_user->test_user_field[1]->value, $value + 1, format_string('@js : The field value was correctly saved.', array('@js' => $js)));
$this->assertEqual($new_user->test_user_field[2]->value, $value + 2, format_string('@js : The field value was correctly saved.', array('@js' => $js)));
}
}
......
......@@ -372,7 +372,7 @@ public function exposedFormAlter(&$form, FormStateInterface $form_state) {
public function exposedFormValidate(&$form, FormStateInterface $form_state) {
if (!$form_state->isValueEmpty('offset') && trim($form_state->getValue('offset'))) {
if (!is_numeric($form_state->getValue('offset')) || $form_state->getValue('offset') < 0) {
$form_state->setErrorByName('offset', $this->t('Offset must be an number greather or equal than 0.'));
$form_state->setErrorByName('offset', $this->t('Offset must be an number greater or equal than 0.'));
}
}
}
......
......@@ -409,7 +409,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
'#type' => 'checkbox',
'#title' => $this->t('Show the empty text in the table'),
'#default_value' => $this->options['empty_table'],
'#description' => $this->t('Per default the table is hidden for an empty view. With this option it is posible to show an empty table with the text in it.'),
'#description' => $this->t('Per default the table is hidden for an empty view. With this option it is possible to show an empty table with the text in it.'),
);
$form['description_markup'] = array(
......
......@@ -518,7 +518,7 @@ public function testTextRendering() {
$random_text_2 = $this->randomMachineName(2);
$random_text_4 = $this->randomMachineName(4);
$random_text_8 = $this->randomMachineName(8);
$touples = array(
$tuples = array(
// Create one string which doesn't fit at all into the limit.
array(
'value' => $random_text_8,
......@@ -547,15 +547,15 @@ public function testTextRendering() {
)
);
foreach ($touples as $touple) {
$row->views_test_data_name = $touple['value'];
foreach ($tuples as $tuple) {
$row->views_test_data_name = $tuple['value'];
$output = $name_field->advancedRender($row);
if ($touple['trimmed']) {
$this->assertNotSubString($output, $touple['value'], format_string('The untrimmed value (!untrimmed) should not appear in the trimmed output (!output).', array('!untrimmed' => $touple['value'], '!output' => $output)));
if ($tuple['trimmed']) {
$this->assertNotSubString($output, $tuple['value'], format_string('The untrimmed value (!untrimmed) should not appear in the trimmed output (!output).', array('!untrimmed' => $tuple['value'], '!output' => $output)));
}
if (!empty($touble['trimmed_value'])) {
$this->assertSubString($output, $touple['trimmed_value'], format_string('The trimmed value (!trimmed) should appear in the trimmed output (!output).', array('!trimmed' => $touple['trimmed_value'], '!output' => $output)));
if (!empty($tuple['trimmed_value'])) {
$this->assertSubString($output, $tuple['trimmed_value'], format_string('The trimmed value (!trimmed) should appear in the trimmed output (!output).', array('!trimmed' => $tuple['trimmed_value'], '!output' => $output)));
}
}
......
......@@ -155,7 +155,7 @@ protected function _testUiValidation() {
// Generate a definitive wrong value, which should be checked by validation.
$edit['options[value][value]'] = $this->randomString() . '-------';
$this->drupalPostForm(NULL, $edit, t('Apply'));
$this->assertText(t('Invalid date format.'), 'Make sure that validation is runned and the invalidate date format is identified.');
$this->assertText(t('Invalid date format.'), 'Make sure that validation is run and the invalidate date format is identified.');
}
}
......@@ -94,7 +94,7 @@ public function testBasePlugin() {
);
$join = $this->manager->createInstance('standard', $configuration);
$this->assertTrue($join instanceof JoinPluginBase, 'The correct join class got loaded.');
$this->assertNull($join->extra, 'The field extra was not overriden.');
$this->assertNull($join->extra, 'The field extra was not overridden.');
$this->assertTrue($join->adjusted, 'The field adjusted was set correctly.');
// Build the actual join values and read them back from the dbtng query
......
......@@ -60,7 +60,7 @@ public function testAjaxView() {
$this->setRawContent($data[1]['data']);
$result = $this->xpath('//div[contains(@class, "views-row")]');
$this->assertEqual(count($result), 2, 'Ensure that two items are renderd in the HTML.');
$this->assertEqual(count($result), 2, 'Ensure that two items are rendered in the HTML.');
}
}
......@@ -167,7 +167,7 @@ public function testHandleWithArgumentsWithoutOverridden() {
*
* Note: This test does not care about upcasting for now.
*/
public function testHandleWithArgumentsOnOveriddenRoute() {
public function testHandleWithArgumentsOnOverriddenRoute() {
$view = $this->getMock('Drupal\views\ViewEntityInterface');
$this->storage->expects($this->once())
......@@ -226,7 +226,7 @@ public function testHandleWithArgumentsOnOveriddenRoute() {
* This test care about upcasted values and ensures that the raw variables
* are pulled in.
*/
public function testHandleWithArgumentsOnOveriddenRouteWithUpcasting() {
public function testHandleWithArgumentsOnOverriddenRouteWithUpcasting() {
$view = $this->getMock('Drupal\views\ViewEntityInterface');
$this->storage->expects($this->once())
......
......@@ -29,8 +29,8 @@ class GroupByTest extends UITestBase {
function testGroupBySave() {
$this->drupalGet('admin/structure/views/view/test_views_groupby_save/edit');
$edit_groubpy_url = 'admin/structure/views/nojs/handler-group/test_views_groupby_save/default/field/id';
$this->assertNoLinkByHref($edit_groubpy_url, 0, 'No aggregation link found.');
$edit_groupby_url = 'admin/structure/views/nojs/handler-group/test_views_groupby_save/default/field/id';
$this->assertNoLinkByHref($edit_groupby_url, 0, 'No aggregation link found.');
// Enable aggregation on the view.
$edit = array(
......@@ -38,10 +38,10 @@ function testGroupBySave() {
);
$this->drupalPostForm('admin/structure/views/nojs/display/test_views_groupby_save/default/group_by', $edit, t('Apply'));
$this->assertLinkByHref($edit_groubpy_url, 0, 'Aggregation link found.');
$this->assertLinkByHref($edit_groupby_url, 0, 'Aggregation link found.');
// Change the groupby type in the UI.
$this->drupalPostForm($edit_groubpy_url, array('options[group_type]' => 'count'), t('Apply'));
$this->drupalPostForm($edit_groupby_url, array('options[group_type]' => 'count'), t('Apply'));
$this->assertLink('COUNT(Views test: ID)', 0, 'The count setting is displayed in the UI');
$this->drupalPostForm(NULL, array(), t('Save'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment