- 🇮🇳India sahil.goyal
rerolled to the corresponding #19 to trying to fix CCF/CI errors
- Status changed to Needs review
about 2 years ago 4:58am 25 January 2023 - Status changed to RTBC
about 2 years ago 3:59pm 25 January 2023 - Status changed to Needs work
about 2 years ago 5:16pm 25 January 2023 - 🇮🇹Italy mondrake 🇮🇹
-
+++ b/core/lib/Drupal/Core/Test/AssertMailTrait.php @@ -50,16 +50,56 @@ protected function getMails(array $filter = []) { + * @param string $group + * An asset group.
This seems unused in the method? $group existed in the past in Simpletest times, now we dropped it.
-
+++ b/core/lib/Drupal/Core/Test/AssertMailTrait.php @@ -50,16 +50,56 @@ protected function getMails(array $filter = []) { + protected function assertMail($name, $value = '', $message = '', $group = 'Email', $index = NULL) {
Since we are here, can we typehint the parameters and/or at least the return
void
? -
+++ b/core/lib/Drupal/Core/Test/AssertMailTrait.php @@ -50,16 +50,56 @@ protected function getMails(array $filter = []) { + ? new FormattableMarkup( ... + : new FormattableMarkup('No email with index @index found',
We now tend to avoid use of
FormattableMarkup
to format the assertion failure messages. Better use"No email with index {$index} found"
orsprintf("No email with index %d found", $index)
. -
+++ b/core/lib/Drupal/Core/Test/AssertMailTrait.php @@ -50,16 +50,56 @@ protected function getMails(array $filter = []) { + ? new FormattableMarkup('@message (Fails because no email found)', ... + ? new FormattableMarkup('@message (Fails because field "@name" is not set)', ... + : new FormattableMarkup('Field "@name" is not set', ['@name' => $name])
same here
-
+++ b/core/lib/Drupal/Core/Test/AssertMailTrait.php @@ -50,16 +50,56 @@ protected function getMails(array $filter = []) { + protected function resetStoredEmails() {
this is introduced but not used anywhere? I think we need a test, at least.
-
- 🇮🇳India TanujJain-TJ
Updating patch after addressing points from #25, although i am not sure about how to move forward with point 5. please review.