Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Shruthi Shetty M created an issue. See original summary.

Shruthi Shetty M’s picture

Removed calls to deprecated method assertEqual() and replaced it with assertEquals().

idebr’s picture

Status: Needs review » Needs work

The arguments for $actual, $expected are inverted between ::assertEqual() and ::assertEqual(), so the test assertions should be swapped as well.

Sahana _N’s picture

removed deprecated method please review

Sahana _N’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: deprecated_assertequal_removed-3034757-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Sahana _N’s picture

Status: Needs work » Needs review
FileSize
2.26 KB

removed deprecated method please review

Status: Needs review » Needs work

The last submitted patch, 7: deprecated_assertequal_removed-3034757-7.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

shubham.prakash’s picture

Status: Needs work » Needs review
FileSize
2.18 KB

Hope this patch fixes the issue.

Berdir’s picture

Status: Needs review » Needs work
+++ b/tests/src/Kernel/PathautoTokenTest.php
@@ -38,7 +38,7 @@ class PathautoTokenTest extends KernelTestBase {
     $alias_cleaner = \Drupal::service('pathauto.alias_cleaner');
     $alias_cleaner->cleanTokenValues($replacements, $data, []);
-    $this->assertEqual($replacements['[array:join-path]'], 'test-first-arg/array-value');
+    $this->assertEquals($replacements['[array:join-path]'], 'test-first-arg/array-value');
 

the arguments here need to be inverted too.

shubham.prakash’s picture

Status: Needs work » Needs review
FileSize
2.18 KB

This patch should fix the issue.

ravi.shankar’s picture

Status: Needs review » Reviewed & tested by the community
amateescu’s picture

The patch is missing the most important part mentioned in the issue title: the conversion of assertEqual() to assertEquals() or equivalent methods.

Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, fixed some spacing and case problems on commit.

  • Berdir committed 055a35a on 8.x-1.x authored by amateescu
    Issue #3034757 by Sahana _N, shubham.prakash, amateescu, Shruthi Shetty...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.