Problem/Motivation

  • Fix PHPUnit errors:
    TypeError: 'Behat\Mink\Element\TraversableElement::findButton(): Argument #1 ($locator) must be of type string, Drupal\Core\StringTranslation\TranslatableMarkup given

Issue fork cloud-3425376

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yas created an issue. See original summary.

yas’s picture

Category: Task » Bug report
yas’s picture

Status: Needs work » Needs review

@baldwinlouie

Can you please review the patch? Thanks!

baldwinlouie’s picture

Status: Needs review » Needs work

@yas, I started to add comments to the code. But since my idea applies to all the changes, I will post it here.

Instead of casting the to (string) $this->t('Save'), would it be better to use the following $this->t('Save')->render()?

What do you think?

yas’s picture

Status: Needs work » Needs review

@baldwinlouie

Thank you for your review and suggestion. I changed from casting (string) to using ->render(). Can you review the patch again? Thanks

baldwinlouie’s picture

Status: Needs review » Reviewed & tested by the community

@yas, thank you for the updated patch. It looks good to me now.

yas’s picture

@baldwinlouie

Thank you for your review. I'll merge the patch to 7.x, and close this issue as Fixed.

  • yas committed c1ff627c on 7.x
    Issue #3425376 by yas, baldwinlouie: Fix PHPUnit errors: 'TypeError: '...
yas’s picture

Status: Reviewed & tested by the community » Fixed

yas’s picture

Status: Fixed » Reviewed & tested by the community

@baldwinlouie

I found there are some uncovered codes for ->render(), so I'll merge the hotfix to 7.x, and close this issue as Fixed.

  • yas committed 3761c37f on 7.x
    Issue #3425376 by yas: Fix PHPUnit errors: 'TypeError: 'Behat\Mink\...
yas’s picture

Status: Reviewed & tested by the community » Fixed

@baldwinlouie

I found there are some uncovered codes for ->render(), so I'll merge the hotfix to 7.x, and close this issue as Fixed.

Status: Fixed » Closed (fixed)

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