drupalGet('system-test/drupal-set-message'); $this->assertNoText('First message (removed).'); $this->assertRaw(t('Second message with markup! (not removed).')); // Ensure duplicate messages are handled as expected. $this->assertUniqueText('Non Duplicated message'); $this->assertNoUniqueText('Duplicated message'); // Ensure Markup objects are rendered as expected. $this->assertRaw('Markup with markup!'); $this->assertUniqueText('Markup with markup!'); $this->assertRaw('Markup2 with markup!'); // Ensure when the same message is of different types it is not duplicated. $this->assertUniqueText('Non duplicate Markup / string.'); $this->assertNoUniqueText('Duplicate Markup / string.'); // Ensure that strings that are not marked as safe are escaped. $this->assertEscaped('Thismarkup will be escaped.'); } }