Commit 36fe1245 authored by catch's avatar catch

Issue #2971375 by cspitzlay: Fix "does not exists" in comments and test error messages

parent 1ef022e7
......@@ -1912,7 +1912,7 @@ function install_check_translations($langcode, $server_pattern) {
}
}
// If the translations directory does not exists, throw an error.
// If the translations directory does not exist, throw an error.
if (!$translations_directory_exists) {
$requirements['translations directory exists'] = [
'title' => t('Translations directory'),
......
......@@ -577,7 +577,7 @@ public function addString($p_filename, $p_string, $p_datetime = false, $p_params
* indicated by $p_path. When relevant the memorized path of the
* files/dir can be modified by removing the $p_remove_path path at the
* beginning of the file/dir path.
* While extracting a file, if the directory path does not exists it is
* While extracting a file, if the directory path does not exist it is
* created.
* While extracting a file, if the file already exists it is replaced
* without looking for last modification date.
......
......@@ -40,7 +40,7 @@ public function testDeleteFeed() {
// Check feed source.
$this->drupalGet('aggregator/sources/' . $feed1->id());
$this->assertResponse(404, 'Deleted feed source does not exists.');
$this->assertResponse(404, 'Deleted feed source does not exist.');
// Check database for feed.
$result = db_query("SELECT COUNT(*) FROM {aggregator_feed} WHERE title = :title AND url = :url", [':title' => $feed1->label(), ':url' => $feed1->getUrl()])->fetchField();
......
......@@ -147,7 +147,7 @@ protected function callMethodOnFieldPlugin(MigrateFieldPluginManagerInterface $f
$plugin_id = $field_plugin_manager->getPluginIdFromFieldType($field_type, [], $this->migration);
$plugin_instance = $field_plugin_manager->createInstance($plugin_id, [], $this->migration);
if (!is_callable([$plugin_instance, $method])) {
throw new MigrateException('The specified method does not exists or is not callable.');
throw new MigrateException('The specified method does not exist or is not callable.');
}
return call_user_func_array([$plugin_instance, $method], [$row]);
}
......
......@@ -918,7 +918,7 @@ function system_check_directory($form_element, FormStateInterface $form_state) {
$logger = \Drupal::logger('file system');
if (!is_dir($directory) && !drupal_mkdir($directory, NULL, TRUE)) {
// If the directory does not exists and cannot be created.
// If the directory does not exist and cannot be created.
$form_state->setErrorByName($form_element['#parents'][0], t('The directory %directory does not exist and could not be created.', ['%directory' => $directory]));
$logger->error('The directory %directory does not exist and could not be created.', ['%directory' => $directory]);
}
......
......@@ -74,7 +74,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
return 'en';
}
}
// If the user's language does not exists, use the default language.
// If the user's language does not exist, use the default language.
elseif ($this->languageManager->getLanguage($value) === NULL) {
return $this->languageManager->getDefaultLanguage()->getId();
}
......
......@@ -93,7 +93,7 @@ public function testSchema() {
// Test for fake index and test for the boolean result of indexExists().
$index_exists = Database::getConnection()->schema()->indexExists('test_table', 'test_field');
$this->assertIdentical($index_exists, FALSE, 'Fake index does not exists');
$this->assertIdentical($index_exists, FALSE, 'Fake index does not exist');
// Add index.
db_add_index('test_table', 'test_field', ['test_field'], $table_specification);
// Test for created index and test for the boolean result of indexExists().
......
......@@ -488,7 +488,7 @@ public function hiddenFieldExists($field, TraversableElement $container = NULL)
}
/**
* Checks that specific hidden field does not exists.
* Checks that specific hidden field does not exist.
*
* @param string $field
* One of id|name|value for the hidden field.
......
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