Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3052940-2.patch | 542 bytes | Krzysztof Domański |
Comments
Comment #2
Krzysztof DomańskiComment #3
cilefen CreditAttribution: cilefen as a volunteer commentedComment #4
cilefen CreditAttribution: cilefen as a volunteer commentedComment #6
yogeshmpawarAll looks good so setting back to RTBC! Tests failure is not related (see #3055648: Frequent random fail in \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTest).
Comment #8
larowlanCommitted 80c97af and pushed to 8.8.x. Thanks!
c/p as 961af08f9f and pushed to 8.7.x