From e66b736aa6c2e00643b9b061d7064c7991503390 Mon Sep 17 00:00:00 2001 From: Joel Uckelman Date: Mon, 27 Feb 2012 05:54:36 +0100 Subject: Remove Edit marker from incoming mail, add it to outgoing mail. --- test/build_postTest.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 test/build_postTest.php (limited to 'test/build_postTest.php') diff --git a/test/build_postTest.php b/test/build_postTest.php new file mode 100644 index 0000000..be542dd --- /dev/null +++ b/test/build_postTest.php @@ -0,0 +1,43 @@ +assertEquals( + $expected, + build_post_subject($ltag, $ftag, $subject) + ); + } + + public function build_post_subject_data() { + return array( + array('[l]', '[f]', '', '(no subject)'), + array('[l]', '[f]', 'Re:', '(no subject)'), + array('[l]', '[f]', 'Subject', 'Subject'), + array('[l]', '[f]', 'Re: Subject', 'Subject'), + array('[l]', '[f]', 'Re: Re: Re: Subject', 'Subject'), + array('[l]', '[f]', '[f] Subject', 'Subject'), + array('[l]', '[f]', '[f] [f] Subject', 'Subject'), + array('[l]', '[f]', '[f] [f] Subject [f]', 'Subject'), + array('[l]', '[f]', '[l] [f] Re: Subject', 'Subject'), + array('[l]', '[f]', 'Re: [l] [f] Subject', 'Subject'), + array('[l]', '[f]', 'Re: Subject [l][f] Subject', 'Subject Subject'), + array('[l]', '[f]', 'Edit:', '(no subject)'), + array('[l]', '[f]', 'Edit: Re:', '(no subject)'), + array('[l]', '[f]', 'Edit: Subject', 'Subject'), + array('[l]', '[f]', 'Edit: Re: Subject', 'Subject'), + array('[l]', '[f]', 'Edit: Re: Re: Re: Subject', 'Subject'), + array('[l]', '[f]', 'Edit: [f] Subject', 'Subject'), + array('[l]', '[f]', 'Edit: [f] [f] Subject', 'Subject'), + array('[l]', '[f]', 'Edit: [f] [f] Subject [f]', 'Subject'), + array('[l]', '[f]', '[l] [f] Edit: Re: Subject', 'Subject'), + array('[l]', '[f]', 'Edit: Re: [l] [f] Subject', 'Subject'), + array('[l]', '[f]', 'Edit: Re: Subject [l][f] Subject', 'Subject Subject') + ); + } +} + +?> -- cgit v1.2.3