Skip to content
Snippets Groups Projects

Fix strict type errors: Convert FormattableMarkup to strings (simple replacement) in core Functional tests

Files
39
@@ -2,7 +2,6 @@
namespace Drupal\Tests\block_content\Functional;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\block_content\Entity\BlockContent;
use Drupal\user\UserInterface;
@@ -76,7 +75,7 @@ public function testRevisions() {
->getStorage('block_content')
->loadRevision($revision_id);
// Verify revision log is the same.
$this->assertEquals($logs[$delta], $loaded->getRevisionLogMessage(), new FormattableMarkup('Correct log message found for revision @revision', ['@revision' => $loaded->getRevisionId()]));
$this->assertEquals($logs[$delta], $loaded->getRevisionLogMessage(), "Correct log message found for revision $revision_id");
if ($delta > 0) {
$this->assertInstanceOf(UserInterface::class, $loaded->getRevisionUser());
$this->assertIsNumeric($loaded->getRevisionUserId());
Loading