function test_replacements() { $mail = new TestMailer(); $replacements = array('@DATE@', '@BROWSER@', '@IPADDRESS@', '@HOSTNAME@', '@TITLE@', '@DOKUWIKIURL@', '@USER@', '@NAME@', '@MAIL@'); $mail->setBody('A test mail in with replacements ' . join(' ', $replacements)); $text = $mail->prop('text'); $html = $mail->prop('html'); foreach ($replacements as $repl) { $this->assertNotRegexp("/{$repl}/", $text, "{$repl} replacement still in text"); $this->assertNotRegexp("/{$repl}/", $html, "{$repl} replacement still in html"); } }