*/
protected function assertMailSentContainingString(string $string, int $mailIndex = 0): void {
$mail = $this->form->getMail()[$mailIndex];
- $this->assertStringContainsString(preg_replace('/\s+/', '', $string), preg_replace('/\s+/', '', $mail['body']));
+ $this->assertStringContainsString(preg_replace('/\s+/', '', $string), preg_replace('/\s+/', '', $mail['body']), 'String not found: ' . $string . "\n" . $mail['body']);
}
+ /**
+ * Assert that the sent mail included the supplied string.
+ *
+ * @param string $string
+ * @param int $mailIndex
+ */
+ protected function assertMailSentNotContainingString(string $string, int $mailIndex = 0): void {
+ $mail = $this->form->getMail()[$mailIndex];
+ $this->assertStringNotContainsString(preg_replace('/\s+/', '', $string), preg_replace('/\s+/', '', $mail['body']));
+ }
+
/**
* Assert that the sent mail included the supplied string.
*