Skip to content

Commit

Permalink
Issue #3160124 by jungle, jameszhang023, alexpott: Fix "wiget, escape…
Browse files Browse the repository at this point in the history
…able, PHPunit" typos in Core

(cherry picked from commit 0345c33765c4f373497b708a7892f396665c1d2b)
(cherry picked from commit 275ac5ab0e8dfb4c717020b8a400c1c3f5cf3633)
  • Loading branch information
alexpott committed Jul 21, 2020
1 parent 7ced98e commit 04eddd4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 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 @@ -217,7 +217,7 @@ public function runTests($test_id, array $unescaped_test_classnames, &$status =
'test_id' => $test_id,
'test_class' => implode(",", $unescaped_test_classnames),
'status' => TestStatus::label($status),
'message' => 'PHPunit Test failed to complete; Error: ' . implode("\n", $output),
'message' => 'PHPUnit Test failed to complete; Error: ' . implode("\n", $output),
'message_group' => 'Other',
'function' => implode(",", $unescaped_test_classnames),
'line' => '0',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testViewsAdmin() {
$page->find('css', '.js-media-library-view .view-filters')->pressButton('Apply filters');
$this->waitForElementsCount('css', '.js-media-library-item', 1);

// Test the same routine but in the view for the table wiget.
// Test the same routine but in the view for the table widget.
$this->drupalGet('/admin/structure/views/view/media_library/edit/widget_table');
$this->waitForElementsCount('css', '.js-media-library-item', 8);

Expand Down
10 changes: 5 additions & 5 deletions tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class HtmlEscapedTextTest extends TestCase {
* @dataProvider providerToString
*/
public function testToString($text, $expected, $message) {
$escapeable_string = new HtmlEscapedText($text);
$this->assertEquals($expected, (string) $escapeable_string, $message);
$this->assertEquals($expected, $escapeable_string->jsonSerialize());
$escapable_string = new HtmlEscapedText($text);
$this->assertEquals($expected, (string) $escapable_string, $message);
$this->assertEquals($expected, $escapable_string->jsonSerialize());
}

/**
Expand Down Expand Up @@ -57,8 +57,8 @@ public function providerToString() {
*/
public function testCount() {
$string = 'Can I please have a <em>kitten</em>';
$escapeable_string = new HtmlEscapedText($string);
$this->assertEquals(strlen($string), $escapeable_string->count());
$escapable_string = new HtmlEscapedText($string);
$this->assertEquals(strlen($string), $escapable_string->count());
}

}
2 changes: 1 addition & 1 deletion tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function ($unescaped_test_classnames, $phpunit_file, &$status) {
'test_id' => $test_id,
'test_class' => 'SomeTest',
'status' => TestStatus::label(TestStatus::EXCEPTION),
'message' => 'PHPunit Test failed to complete; Error: ',
'message' => 'PHPUnit Test failed to complete; Error: ',
'message_group' => 'Other',
'function' => 'SomeTest',
'line' => '0',
Expand Down

0 comments on commit 04eddd4

Please sign in to comment.