Skip to content
Snippets Groups Projects

Issue #3212034: Account emails are missing newlines due to Symfony parsing bug

Open Dave Long requested to merge issue/drupal-3212034:3212034-test-only into 9.3.x
1 file
+ 53
0
Compare changes
  • Side-by-side
  • Inline
<?php
namespace Drupal\Tests\user\Kernel;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests that user.mail default settings are parsed correctly.
*
* @group user
*/
class UserMailDefaultsTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['user', 'system'];
protected function setUp(): void {
parent::setUp();
$this->installConfig(['user']);
}
/**
* Tests that each user mail contains blank lines.
*
* @dataProvider userMailsProvider
*/
public function testMailDefaults($key) {
$body = $this->config('user.mail')->get("$key.body");
$this->assertStringContainsString("\n\n", $body);
}
/**
* Data provider for user mail testing.
*
* @return array
*/
public function userMailsProvider() {
return [
['cancel_confirm'],
['password_reset'],
['status_activated'],
['status_blocked'],
['status_canceled'],
['register_admin_created'],
['register_no_approval_required'],
['register_pending_approval'],
['register_pending_approval_admin'],
];
}
}
Loading