Change record status: 
Project: 
Introduced in branch: 
10.1.x
Introduced in version: 
10.1.0
Description: 

In tests, $this->assert[Not]Equals() will now issue a deprecation when either the expected or the actual value is a MarkupInterface object AND the stringified values contain markup.

This makes assert[Not]Equals() suitable for comparison when the markup is not relevant, and requires more strictness when the markup is relevant: in the latter case, tests should use assert[Not]Same() instead, and cast explicitly the compared values to string.

Examples:

1) Markup not relevant

before
$this->assertEquals('<em class="placeholder">Test entity entities</em> can only be created in the default workspace.', $violations[0]->getMessage());

after
$this->assertEquals('Test entity entities can only be created in the default workspace.', $violations[0]->getMessage());

2) Markup relevant

before

$this->assertEquals('<h1>&lt;span&gt;' . $random_text . '&lt;/span&gt;</h1>', $output, 'Valid tags are allowed in rewrite templates and token replacements.');

after

$this->assertSame('<h1>&lt;span&gt;' . $random_text . '&lt;/span&gt;</h1>', (string) $output, 'Valid tags are allowed in rewrite templates and token replacements.');
Impacts: 
Module developers