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.
Comments
Comment #2
krzysztof domańskiComment #3
cilefen commentedComment #4
cilefen 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