Skip to content

Commit

Permalink
Issue #3159528 by jameszhang023, jungle, longwave: Fix typos: "exepti…
Browse files Browse the repository at this point in the history
…on|gaurd|ouptut|withut|defintion" in core

(cherry picked from commit 38d02d6e4b52416e7648849559603dc49addcae8)
(cherry picked from commit e8afa49ac1339d3c2f5b211309ec354d5438ffae)
  • Loading branch information
alexpott committed Jul 17, 2020
1 parent 827ec9a commit a345851
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/Drupal/Core/Test/PhpUnitTestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public function runCommand(array $unescaped_test_classnames, $phpunit_file, &$st
*/
public function runTests($test_id, array $unescaped_test_classnames, &$status = NULL) {
$phpunit_file = $this->xmlLogFilePath($test_id);
// Store ouptut from our test run.
// Store output from our test run.
$output = [];
$this->runCommand($unescaped_test_classnames, $phpunit_file, $status, $output);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
function config_schema_test_config_schema_info_alter(&$definitions) {
if (\Drupal::state()->get('config_schema_test_exception_add')) {
$definitions['config_schema_test.hook_added_defintion'] = $definitions['config_schema_test.hook'];
$definitions['config_schema_test.hook_added_definition'] = $definitions['config_schema_test.hook'];
}
if (\Drupal::state()->get('config_schema_test_exception_remove')) {
unset($definitions['config_schema_test.hook']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function doTestCollectionFilterAccessBasedOnPermissions($label_field_name

// Test.
$collection_url = Url::fromRoute('jsonapi.entity_test--bar.collection');
// Specifying a delta exercises TemporaryQueryGaurd more thoroughly.
// Specifying a delta exercises TemporaryQueryGuard more thoroughly.
$filter_path = "spotlight.0.$label_field_name";
$collection_filter_url = $collection_url->setOption('query', ["filter[$filter_path]" => $this->entity->label()]);
$request_options = [];
Expand Down
4 changes: 2 additions & 2 deletions tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ public function testConfigSchemaInfoAlter() {
}
catch (ConfigSchemaAlterException $e) {
$this->pass($message);
$this->assertEqual($e->getMessage(), 'Invoking hook_config_schema_info_alter() has added (config_schema_test.hook_added_defintion) and removed (config_schema_test.hook) schema definitions');
$this->assertEqual($e->getMessage(), 'Invoking hook_config_schema_info_alter() has added (config_schema_test.hook_added_definition) and removed (config_schema_test.hook) schema definitions');
}

\Drupal::state()->set('config_schema_test_exception_remove', FALSE);
Expand All @@ -589,7 +589,7 @@ public function testConfigSchemaInfoAlter() {
}
catch (ConfigSchemaAlterException $e) {
$this->pass($message);
$this->assertEqual($e->getMessage(), 'Invoking hook_config_schema_info_alter() has added (config_schema_test.hook_added_defintion) schema definitions');
$this->assertEqual($e->getMessage(), 'Invoking hook_config_schema_info_alter() has added (config_schema_test.hook_added_definition) schema definitions');
}

// Tests that hook_config_schema_info_alter() can add additional metadata to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ public function testReservedKeywordsInAnnotations()
$this->assertInstanceOf(Null::class, $result[0]);
}

public function testSetValuesExeption()
public function testSetValuesException()
{
$this->expectException('\Doctrine\Common\Annotations\AnnotationException');
$this->expectExceptionMessage('[Creation Error] The annotation @SomeAnnotationClassNameWithoutConstructor declared on some class does not have a property named "invalidaProperty". Available properties: data, name');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testGetDefinition($expected, $has_register_definitions, $excepti
// Mock our StaticDiscoveryDecorator.
$mock_decorator = $this->getMockBuilder('Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator')
->disableOriginalConstructor()
->setMethods(['registeredDefintionCallback'])
->setMethods(['registeredDefinitionCallback'])
->getMock();

// Set up the ::$registerDefinitions property.
Expand Down Expand Up @@ -132,7 +132,7 @@ public function testGetDefinitions($has_register_definitions, $definitions) {
// Mock our StaticDiscoveryDecorator.
$mock_decorator = $this->getMockBuilder('Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator')
->disableOriginalConstructor()
->setMethods(['registeredDefintionCallback'])
->setMethods(['registeredDefinitionCallback'])
->getMock();

// Set up the ::$registerDefinitions property.
Expand Down
4 changes: 2 additions & 2 deletions tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ protected function setUpEntityType($definition) {
*
* @dataProvider providerTestGet
*/
public function testGet(array $defintion, $key, $expected) {
$entity_type = $this->setUpEntityType($defintion);
public function testGet(array $definition, $key, $expected) {
$entity_type = $this->setUpEntityType($definition);
$this->assertSame($expected, $entity_type->get($key));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function providerGetFormClass() {
return [
'block plugin without forms, "configure" operation' => [$block_plugin_without_forms, 'configure', TestClass::class],
'block plugin without forms, "tickle" operation' => [$block_plugin_without_forms, 'tickle', NULL],
'block plugin withut forms, "poke" operation' => [$block_plugin_without_forms, 'poke', NULL],
'block plugin without forms, "poke" operation' => [$block_plugin_without_forms, 'poke', NULL],
'block plugin with forms, "configure" operation' => [$block_plugin_with_forms, 'configure', TestClass::class],
'block plugin with forms, "tickle" operation' => [$block_plugin_with_forms, 'tickle', NULL],
'block plugin with forms, "poke" operation' => [$block_plugin_with_forms, 'poke', static::class],
Expand Down

0 comments on commit a345851

Please sign in to comment.