Problem/Motivation

Incorrect data type for the $expected parameter.

 * @dataProvider providerFilterAttributes
 *
 * @param string $html
 *   Input HTML.
 * @param array $expected
 *   The expected output string.
 */
public function testfilterAttributes($html, $expected) {
  $this->assertSame($expected, $this->filter->filterAttributes($html));
}

/**
 * Provides data for testfilterAttributes.
 *
 * @return array
 *   An array of test data.
 */
public function providerFilterAttributes() {
  return [
    ['<a href="/blog" title="Blog">Blog</a>', '<a href="/blog">Blog</a>'],
    ['<p dir="rtl" />', '<p dir="rtl"></p>'],
    ['<p dir="bogus" />', '<p></p>'],

Proposed resolution

Should be a string.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Krzysztof Domański created an issue. See original summary.

Krzysztof Domański’s picture

Status: Active » Needs review
FileSize
542 bytes
cilefen’s picture

Issue tags: +Documentation
cilefen’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 3052940-2.patch, failed testing. View results

yogeshmpawar’s picture

Status: Needs work » Reviewed & tested by the community

All looks good so setting back to RTBC! Tests failure is not related (see #3055648: Frequent random fail in \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTest).

  • larowlan committed 80c97af on 8.8.x
    Issue #3052940 by Krzysztof Domański: Incorrect data type for the...
larowlan’s picture

Version: 8.8.x-dev » 8.7.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 80c97af and pushed to 8.8.x. Thanks!

c/p as 961af08f9f and pushed to 8.7.x

  • larowlan committed 961af08 on 8.7.x
    Issue #3052940 by Krzysztof Domański: Incorrect data type for the...

Status: Fixed » Closed (fixed)

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