Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added subscribe and unsubscribe tests

  • Loading branch information...
commit 6e20d19a6c11f99d3f75d714a7067758bc7210b3 1 parent 958c05c
@hm2k hm2k authored
View
150 tests/members-add-fail.html
@@ -0,0 +1,150 @@
+
+<HTML>
+<HEAD>
+<LINK REL="SHORTCUT ICON" HREF="/img-sys/mm-icon.png">
+<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+<TITLE>Test Administration (Membership&nbsp;Management...)</TITLE>
+</HEAD>
+<BODY bgcolor="white"
+dir="ltr">
+<h5>Error subscribing:</h5>
+<ul>
+<li>a@example.net -- Already a member
+</ul>
+<p><center><h2>Test mailing list administration<br>Membership&nbsp;Management... Section</h2></center><hr>
+<FORM action="../../../admin/test_example.co.uk/members/add" method="POST" enctype="multipart/form-data">
+
+ <table WIDTH="100%">
+ <tr>
+ <td><center><strong>Configuration Categories</strong></center></td>
+ <td><center><strong>Other Administrative Activities</strong></center></td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr VALIGN="top">
+ <td>
+ <ul>
+ <li><a href="../../../admin/test_example.co.uk/general">General Options</a>
+ <li><a href="../../../admin/test_example.co.uk/passwords">Passwords</a>
+ <li><a href="../../../admin/test_example.co.uk/language">Language&nbsp;options</a>
+ <li><strong>Membership&nbsp;Management...</strong>
+<ul>
+<li><a href="../../../admin/test_example.co.uk/members/list">Membership&nbsp;List</a>
+<li><a href="../../../admin/test_example.co.uk/members/add"><strong>[Mass&nbsp;Subscription]</strong></a>
+<li><a href="../../../admin/test_example.co.uk/members/remove">Mass&nbsp;Removal</a>
+</ul>
+
+ <li><a href="../../../admin/test_example.co.uk/nondigest">Non-digest&nbsp;options</a>
+ <li><a href="../../../admin/test_example.co.uk/digest">Digest options</a>
+ </ul>
+</td>
+ <td>
+ <ul>
+ <li><a href="../../../admin/test_example.co.uk/privacy">Privacy options...</a>
+ <li><a href="../../../admin/test_example.co.uk/bounce">Bounce processing</a>
+ <li><a href="../../../admin/test_example.co.uk/archive">Archiving Options</a>
+ <li><a href="../../../admin/test_example.co.uk/gateway">Mail&lt;-&gt;News&nbsp;gateways</a>
+ <li><a href="../../../admin/test_example.co.uk/autoreply">Auto-responder</a>
+ <li><a href="../../../admin/test_example.co.uk/contentfilter">Content&nbsp;filtering</a>
+ <li><a href="../../../admin/test_example.co.uk/topics">Topics</a>
+ </ul>
+</td>
+ </tr>
+ </table>
+</td>
+ <td>
+ <ul>
+ <li><a href="../../../admindb/test_example.co.uk">Tend to pending moderator requests</a>
+ <li><a href="../../../listinfo/test_example.co.uk">Go to the general list information page</a>
+ <li><a href="../../../edithtml/test_example.co.uk">Edit the public HTML pages and text files</a>
+ <li><a href="http://example.co.uk/pipermail/test_example.co.uk/">Go to list archives</a><br>&nbsp;<br>
+ <li><a href="../../../admin/test_example.co.uk/logout"><FONT SIZE="+2"><b>Logout</b></FONT></a>
+ </ul>
+</td>
+ </tr>
+ </table>
+<hr>Make your changes in the following section, then submit them
+ using the <em>Submit Your Changes</em> button below.<p>
+ <table WIDTH="100%">
+ <tr>
+ <td COLSPAN="2" BGCOLOR="#99ccff"><center><h2>Mass Subscriptions</h2></center></td>
+ </tr>
+ </table>
+<center>
+ <table WIDTH="90%">
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Subscribe these users now or invite them?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="subscribe_or_invite" type="RADIO" value="0" CHECKED >Subscribe</td>
+ <td><INPUT name="subscribe_or_invite" type="RADIO" value="1" >Invite</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Send welcome messages to new subscribees?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="send_welcome_msg_to_this_batch" type="RADIO" value="0" >No</td>
+ <td><INPUT name="send_welcome_msg_to_this_batch" type="RADIO" value="1" CHECKED >Yes</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Send notifications of new subscriptions to the list owner?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="send_notifications_to_list_owner" type="RADIO" value="0" CHECKED >No</td>
+ <td><INPUT name="send_notifications_to_list_owner" type="RADIO" value="1" >Yes</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><em>Enter one address per line below...</em></td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><center><TEXTAREA NAME=subscribees ROWS=10 COLS=70%></TEXTAREA></center></td>
+ </tr>
+ <tr>
+ <td><em><div align="right">...or specify a file to upload:</div></em></td>
+ <td><INPUT name="subscribees_upload" type="FILE" value="" ></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><em>Below, enter additional text to be added to the
+ top of your invitation or the subscription notification. Include at least
+ one blank line at the end...</em></td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><center><TEXTAREA NAME=invitation ROWS=10 COLS=70%></TEXTAREA></center></td>
+ </tr>
+ </table>
+</center><center>
+ <table CELLPADDING="2" CELLSPACING="0" BORDER="0">
+ <tr>
+ <td ALIGN="middle"><strong><INPUT name="setmemberopts_btn" type="SUBMIT" value="Submit Your Changes" ></strong></td>
+ </tr>
+ </table>
+</center>
+</FORM>
+<hr><address><a href="../../../listinfo/test_example.co.uk">Test</a> list run by <a href="mailto:test-owner@example.co.uk">admin at example.co.uk</a><br><a href="../../../admin/test_example.co.uk">Test administrative interface</a> (requires authorization)<br><a href="../../../listinfo">Overview of all example.co.uk mailing lists</a><p>
+<table WIDTH="100%" BORDER="0">
+ <tr>
+ <td><img src="/img-sys/mailman.jpg" alt="Delivered by Mailman" border=0><br>version 2.1.14-1</td>
+ <td><img src="/img-sys/PythonPowered.png" alt="Python Powered" border=0></td>
+ <td><img src="/img-sys/gnu-head-tiny.jpg" alt="GNU's Not Unix" border=0></td>
+ </tr>
+</table>
+</address>
+</BODY>
+</HTML>
View
150 tests/members-add-success.html
@@ -0,0 +1,150 @@
+
+<HTML>
+<HEAD>
+<LINK REL="SHORTCUT ICON" HREF="/img-sys/mm-icon.png">
+<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+<TITLE>Test Administration (Membership&nbsp;Management...)</TITLE>
+</HEAD>
+<BODY bgcolor="white"
+dir="ltr">
+<h5>Successfully subscribed:</h5>
+<ul>
+<li>a@example.net
+</ul>
+<p><center><h2>Test mailing list administration<br>Membership&nbsp;Management... Section</h2></center><hr>
+<FORM action="../../../admin/test_example.co.uk/members/add" method="POST" enctype="multipart/form-data">
+
+ <table WIDTH="100%">
+ <tr>
+ <td><center><strong>Configuration Categories</strong></center></td>
+ <td><center><strong>Other Administrative Activities</strong></center></td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr VALIGN="top">
+ <td>
+ <ul>
+ <li><a href="../../../admin/test_example.co.uk/general">General Options</a>
+ <li><a href="../../../admin/test_example.co.uk/passwords">Passwords</a>
+ <li><a href="../../../admin/test_example.co.uk/language">Language&nbsp;options</a>
+ <li><strong>Membership&nbsp;Management...</strong>
+<ul>
+<li><a href="../../../admin/test_example.co.uk/members/list">Membership&nbsp;List</a>
+<li><a href="../../../admin/test_example.co.uk/members/add"><strong>[Mass&nbsp;Subscription]</strong></a>
+<li><a href="../../../admin/test_example.co.uk/members/remove">Mass&nbsp;Removal</a>
+</ul>
+
+ <li><a href="../../../admin/test_example.co.uk/nondigest">Non-digest&nbsp;options</a>
+ <li><a href="../../../admin/test_example.co.uk/digest">Digest options</a>
+ </ul>
+</td>
+ <td>
+ <ul>
+ <li><a href="../../../admin/test_example.co.uk/privacy">Privacy options...</a>
+ <li><a href="../../../admin/test_example.co.uk/bounce">Bounce processing</a>
+ <li><a href="../../../admin/test_example.co.uk/archive">Archiving Options</a>
+ <li><a href="../../../admin/test_example.co.uk/gateway">Mail&lt;-&gt;News&nbsp;gateways</a>
+ <li><a href="../../../admin/test_example.co.uk/autoreply">Auto-responder</a>
+ <li><a href="../../../admin/test_example.co.uk/contentfilter">Content&nbsp;filtering</a>
+ <li><a href="../../../admin/test_example.co.uk/topics">Topics</a>
+ </ul>
+</td>
+ </tr>
+ </table>
+</td>
+ <td>
+ <ul>
+ <li><a href="../../../admindb/test_example.co.uk">Tend to pending moderator requests</a>
+ <li><a href="../../../listinfo/test_example.co.uk">Go to the general list information page</a>
+ <li><a href="../../../edithtml/test_example.co.uk">Edit the public HTML pages and text files</a>
+ <li><a href="http://example.co.uk/pipermail/test_example.co.uk/">Go to list archives</a><br>&nbsp;<br>
+ <li><a href="../../../admin/test_example.co.uk/logout"><FONT SIZE="+2"><b>Logout</b></FONT></a>
+ </ul>
+</td>
+ </tr>
+ </table>
+<hr>Make your changes in the following section, then submit them
+ using the <em>Submit Your Changes</em> button below.<p>
+ <table WIDTH="100%">
+ <tr>
+ <td COLSPAN="2" BGCOLOR="#99ccff"><center><h2>Mass Subscriptions</h2></center></td>
+ </tr>
+ </table>
+<center>
+ <table WIDTH="90%">
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Subscribe these users now or invite them?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="subscribe_or_invite" type="RADIO" value="0" CHECKED >Subscribe</td>
+ <td><INPUT name="subscribe_or_invite" type="RADIO" value="1" >Invite</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Send welcome messages to new subscribees?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="send_welcome_msg_to_this_batch" type="RADIO" value="0" >No</td>
+ <td><INPUT name="send_welcome_msg_to_this_batch" type="RADIO" value="1" CHECKED >Yes</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Send notifications of new subscriptions to the list owner?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="send_notifications_to_list_owner" type="RADIO" value="0" CHECKED >No</td>
+ <td><INPUT name="send_notifications_to_list_owner" type="RADIO" value="1" >Yes</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><em>Enter one address per line below...</em></td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><center><TEXTAREA NAME=subscribees ROWS=10 COLS=70%></TEXTAREA></center></td>
+ </tr>
+ <tr>
+ <td><em><div align="right">...or specify a file to upload:</div></em></td>
+ <td><INPUT name="subscribees_upload" type="FILE" value="" ></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><em>Below, enter additional text to be added to the
+ top of your invitation or the subscription notification. Include at least
+ one blank line at the end...</em></td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><center><TEXTAREA NAME=invitation ROWS=10 COLS=70%></TEXTAREA></center></td>
+ </tr>
+ </table>
+</center><center>
+ <table CELLPADDING="2" CELLSPACING="0" BORDER="0">
+ <tr>
+ <td ALIGN="middle"><strong><INPUT name="setmemberopts_btn" type="SUBMIT" value="Submit Your Changes" ></strong></td>
+ </tr>
+ </table>
+</center>
+</FORM>
+<hr><address><a href="../../../listinfo/test_example.co.uk">Test</a> list run by <a href="mailto:test-owner@example.co.uk">admin at example.co.uk</a><br><a href="../../../admin/test_example.co.uk">Test administrative interface</a> (requires authorization)<br><a href="../../../listinfo">Overview of all example.co.uk mailing lists</a><p>
+<table WIDTH="100%" BORDER="0">
+ <tr>
+ <td><img src="/img-sys/mailman.jpg" alt="Delivered by Mailman" border=0><br>version 2.1.14-1</td>
+ <td><img src="/img-sys/PythonPowered.png" alt="Python Powered" border=0></td>
+ <td><img src="/img-sys/gnu-head-tiny.jpg" alt="GNU's Not Unix" border=0></td>
+ </tr>
+</table>
+</address>
+</BODY>
+</HTML>
View
127 tests/members-remove-fail.html
@@ -0,0 +1,127 @@
+
+<HTML>
+<HEAD>
+<LINK REL="SHORTCUT ICON" HREF="/img-sys/mm-icon.png">
+<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+<TITLE>Test Administration (Membership&nbsp;Management...)</TITLE>
+</HEAD>
+<BODY bgcolor="white"
+dir="ltr">
+<h3><strong><font color="#ff0000" size="+2">Cannot unsubscribe non-members:</font></strong></h3>
+<ul>
+<li>a@example.net
+</ul>
+<p><center><h2>Test mailing list administration<br>Membership&nbsp;Management... Section</h2></center><hr>
+<FORM action="../../../admin/test_example.co.uk/members/remove" method="POST" enctype="multipart/form-data">
+
+ <table WIDTH="100%">
+ <tr>
+ <td><center><strong>Configuration Categories</strong></center></td>
+ <td><center><strong>Other Administrative Activities</strong></center></td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr VALIGN="top">
+ <td>
+ <ul>
+ <li><a href="../../../admin/test_example.co.uk/general">General Options</a>
+ <li><a href="../../../admin/test_example.co.uk/passwords">Passwords</a>
+ <li><a href="../../../admin/test_example.co.uk/language">Language&nbsp;options</a>
+ <li><strong>Membership&nbsp;Management...</strong>
+<ul>
+<li><a href="../../../admin/test_example.co.uk/members/list">Membership&nbsp;List</a>
+<li><a href="../../../admin/test_example.co.uk/members/add">Mass&nbsp;Subscription</a>
+<li><a href="../../../admin/test_example.co.uk/members/remove"><strong>[Mass&nbsp;Removal]</strong></a>
+</ul>
+
+ <li><a href="../../../admin/test_example.co.uk/nondigest">Non-digest&nbsp;options</a>
+ <li><a href="../../../admin/test_example.co.uk/digest">Digest options</a>
+ </ul>
+</td>
+ <td>
+ <ul>
+ <li><a href="../../../admin/test_example.co.uk/privacy">Privacy options...</a>
+ <li><a href="../../../admin/test_example.co.uk/bounce">Bounce processing</a>
+ <li><a href="../../../admin/test_example.co.uk/archive">Archiving Options</a>
+ <li><a href="../../../admin/test_example.co.uk/gateway">Mail&lt;-&gt;News&nbsp;gateways</a>
+ <li><a href="../../../admin/test_example.co.uk/autoreply">Auto-responder</a>
+ <li><a href="../../../admin/test_example.co.uk/contentfilter">Content&nbsp;filtering</a>
+ <li><a href="../../../admin/test_example.co.uk/topics">Topics</a>
+ </ul>
+</td>
+ </tr>
+ </table>
+</td>
+ <td>
+ <ul>
+ <li><a href="../../../admindb/test_example.co.uk">Tend to pending moderator requests</a>
+ <li><a href="../../../listinfo/test_example.co.uk">Go to the general list information page</a>
+ <li><a href="../../../edithtml/test_example.co.uk">Edit the public HTML pages and text files</a>
+ <li><a href="http://example.co.uk/pipermail/test_example.co.uk/">Go to list archives</a><br>&nbsp;<br>
+ <li><a href="../../../admin/test_example.co.uk/logout"><FONT SIZE="+2"><b>Logout</b></FONT></a>
+ </ul>
+</td>
+ </tr>
+ </table>
+<hr>Make your changes in the following section, then submit them
+ using the <em>Submit Your Changes</em> button below.<p>
+ <table WIDTH="100%">
+ <tr>
+ <td COLSPAN="2" BGCOLOR="#99ccff"><center><h2>Mass Removals</h2></center></td>
+ </tr>
+ </table>
+<center>
+ <table WIDTH="90%">
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Send unsubscription acknowledgement to the user?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="send_unsub_ack_to_this_batch" type="RADIO" value="0" CHECKED >No</td>
+ <td><INPUT name="send_unsub_ack_to_this_batch" type="RADIO" value="1" >Yes</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Send notifications to the list owner?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="send_unsub_notifications_to_list_owner" type="RADIO" value="0" CHECKED >No</td>
+ <td><INPUT name="send_unsub_notifications_to_list_owner" type="RADIO" value="1" >Yes</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><em>Enter one address per line below...</em></td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><center><TEXTAREA NAME=unsubscribees ROWS=10 COLS=70%></TEXTAREA></center></td>
+ </tr>
+ <tr>
+ <td><em><div align="right">...or specify a file to upload:</div></em></td>
+ <td><INPUT name="unsubscribees_upload" type="FILE" value="" ></td>
+ </tr>
+ </table>
+</center><center>
+ <table CELLPADDING="2" CELLSPACING="0" BORDER="0">
+ <tr>
+ <td ALIGN="middle"><strong><INPUT name="setmemberopts_btn" type="SUBMIT" value="Submit Your Changes" ></strong></td>
+ </tr>
+ </table>
+</center>
+</FORM>
+<hr><address><a href="../../../listinfo/test_example.co.uk">Test</a> list run by <a href="mailto:test-owner@example.co.uk">admin at example.co.uk</a><br><a href="../../../admin/test_example.co.uk">Test administrative interface</a> (requires authorization)<br><a href="../../../listinfo">Overview of all example.co.uk mailing lists</a><p>
+<table WIDTH="100%" BORDER="0">
+ <tr>
+ <td><img src="/img-sys/mailman.jpg" alt="Delivered by Mailman" border=0><br>version 2.1.14-1</td>
+ <td><img src="/img-sys/PythonPowered.png" alt="Python Powered" border=0></td>
+ <td><img src="/img-sys/gnu-head-tiny.jpg" alt="GNU's Not Unix" border=0></td>
+ </tr>
+</table>
+</address>
+</BODY>
+</HTML>
View
127 tests/members-remove-success.html
@@ -0,0 +1,127 @@
+
+<HTML>
+<HEAD>
+<LINK REL="SHORTCUT ICON" HREF="/img-sys/mm-icon.png">
+<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+<TITLE>Test Administration (Membership&nbsp;Management...)</TITLE>
+</HEAD>
+<BODY bgcolor="white"
+dir="ltr">
+<h5>Successfully Unsubscribed:</h5>
+<ul>
+<li>a@example.net
+</ul>
+<p><center><h2>Test mailing list administration<br>Membership&nbsp;Management... Section</h2></center><hr>
+<FORM action="../../../admin/test_example.co.uk/members/remove" method="POST" enctype="multipart/form-data">
+
+ <table WIDTH="100%">
+ <tr>
+ <td><center><strong>Configuration Categories</strong></center></td>
+ <td><center><strong>Other Administrative Activities</strong></center></td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr VALIGN="top">
+ <td>
+ <ul>
+ <li><a href="../../../admin/test_example.co.uk/general">General Options</a>
+ <li><a href="../../../admin/test_example.co.uk/passwords">Passwords</a>
+ <li><a href="../../../admin/test_example.co.uk/language">Language&nbsp;options</a>
+ <li><strong>Membership&nbsp;Management...</strong>
+<ul>
+<li><a href="../../../admin/test_example.co.uk/members/list">Membership&nbsp;List</a>
+<li><a href="../../../admin/test_example.co.uk/members/add">Mass&nbsp;Subscription</a>
+<li><a href="../../../admin/test_example.co.uk/members/remove"><strong>[Mass&nbsp;Removal]</strong></a>
+</ul>
+
+ <li><a href="../../../admin/test_example.co.uk/nondigest">Non-digest&nbsp;options</a>
+ <li><a href="../../../admin/test_example.co.uk/digest">Digest options</a>
+ </ul>
+</td>
+ <td>
+ <ul>
+ <li><a href="../../../admin/test_example.co.uk/privacy">Privacy options...</a>
+ <li><a href="../../../admin/test_example.co.uk/bounce">Bounce processing</a>
+ <li><a href="../../../admin/test_example.co.uk/archive">Archiving Options</a>
+ <li><a href="../../../admin/test_example.co.uk/gateway">Mail&lt;-&gt;News&nbsp;gateways</a>
+ <li><a href="../../../admin/test_example.co.uk/autoreply">Auto-responder</a>
+ <li><a href="../../../admin/test_example.co.uk/contentfilter">Content&nbsp;filtering</a>
+ <li><a href="../../../admin/test_example.co.uk/topics">Topics</a>
+ </ul>
+</td>
+ </tr>
+ </table>
+</td>
+ <td>
+ <ul>
+ <li><a href="../../../admindb/test_example.co.uk">Tend to pending moderator requests</a>
+ <li><a href="../../../listinfo/test_example.co.uk">Go to the general list information page</a>
+ <li><a href="../../../edithtml/test_example.co.uk">Edit the public HTML pages and text files</a>
+ <li><a href="http://example.co.uk/pipermail/test_example.co.uk/">Go to list archives</a><br>&nbsp;<br>
+ <li><a href="../../../admin/test_example.co.uk/logout"><FONT SIZE="+2"><b>Logout</b></FONT></a>
+ </ul>
+</td>
+ </tr>
+ </table>
+<hr>Make your changes in the following section, then submit them
+ using the <em>Submit Your Changes</em> button below.<p>
+ <table WIDTH="100%">
+ <tr>
+ <td COLSPAN="2" BGCOLOR="#99ccff"><center><h2>Mass Removals</h2></center></td>
+ </tr>
+ </table>
+<center>
+ <table WIDTH="90%">
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Send unsubscription acknowledgement to the user?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="send_unsub_ack_to_this_batch" type="RADIO" value="0" CHECKED >No</td>
+ <td><INPUT name="send_unsub_ack_to_this_batch" type="RADIO" value="1" >Yes</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td BGCOLOR="#dddddd"><div align="right">Send notifications to the list owner?</div></td>
+ <td BGCOLOR="#dddddd">
+ <table CELLSPACING="5">
+ <tr>
+ <td><INPUT name="send_unsub_notifications_to_list_owner" type="RADIO" value="0" CHECKED >No</td>
+ <td><INPUT name="send_unsub_notifications_to_list_owner" type="RADIO" value="1" >Yes</td>
+ </tr>
+ </table>
+</td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><em>Enter one address per line below...</em></td>
+ </tr>
+ <tr>
+ <td COLSPAN="2"><center><TEXTAREA NAME=unsubscribees ROWS=10 COLS=70%></TEXTAREA></center></td>
+ </tr>
+ <tr>
+ <td><em><div align="right">...or specify a file to upload:</div></em></td>
+ <td><INPUT name="unsubscribees_upload" type="FILE" value="" ></td>
+ </tr>
+ </table>
+</center><center>
+ <table CELLPADDING="2" CELLSPACING="0" BORDER="0">
+ <tr>
+ <td ALIGN="middle"><strong><INPUT name="setmemberopts_btn" type="SUBMIT" value="Submit Your Changes" ></strong></td>
+ </tr>
+ </table>
+</center>
+</FORM>
+<hr><address><a href="../../../listinfo/test_example.co.uk">Test</a> list run by <a href="mailto:test-owner@example.co.uk">admin at example.co.uk</a><br><a href="../../../admin/test_example.co.uk">Test administrative interface</a> (requires authorization)<br><a href="../../../listinfo">Overview of all example.co.uk mailing lists</a><p>
+<table WIDTH="100%" BORDER="0">
+ <tr>
+ <td><img src="/img-sys/mailman.jpg" alt="Delivered by Mailman" border=0><br>version 2.1.14-1</td>
+ <td><img src="/img-sys/PythonPowered.png" alt="Python Powered" border=0></td>
+ <td><img src="/img-sys/gnu-head-tiny.jpg" alt="GNU's Not Unix" border=0></td>
+ </tr>
+</table>
+</address>
+</BODY>
+</HTML>
View
34 tests/test.php
@@ -0,0 +1,34 @@
+<?php
+
+//settings
+/*$testURL = 'http://example.co.uk/mailman/admin';
+$testList = 'test_example.co.uk';
+$testPW = 'password';*/
+$testURL='http://phurix.co.uk/mailman/admin';
+$testList='test_phurix.co.uk';
+$testPW='password-cannot-have-spaces';
+
+//get html
+//$html=file_get_contents('members-short.html');
+//$length=strlen($html);
+
+//set mailman
+require_once 'Services/Mailman.php';
+$mailman = new Services_Mailman($testURL,$testList,$testPW);
+
+//set mock
+/*require_once 'HTTP/Request2/Adapter/Mock.php';
+$mock = new HTTP_Request2_Adapter_Mock();
+$response= "HTTP/1.1 200 OK\r\n" .
+ "Content-Length: $length\r\n" .
+ "Connection: close\r\n" .
+ "\r\n" .
+ $html;
+$mock->addResponse($response);
+$mock->addResponse($response);
+
+//set mock adapter
+$mailman->request->setAdapter($mock);*/
+$mailman->setDigest('james.wade@phurix.co.uk');
+
+?>
View
51 tests/test_subscribe.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test for Services_Mailman subscribe member
+--FILE--
+<?php
+
+//settings
+$testURL = 'http://example.co.uk/mailman/admin';
+$testList = 'test_example.co.uk';
+$testPW = 'password';
+
+//get html
+$html_success = file_get_contents('members-add-success.html');
+$len_success = strlen($html_success);
+$html_fail = file_get_contents('members-add-fail.html');
+$len_fail = strlen($html_fail);
+
+//set mailman
+require_once 'Services/Mailman.php';
+$mailman = new Services_Mailman($testURL,$testList,$testPW);
+
+//set mock
+require_once 'HTTP/Request2/Adapter/Mock.php';
+$mock = new HTTP_Request2_Adapter_Mock();
+$response = "HTTP/1.1 200 OK\r\n" .
+ "Content-Length: %s\r\n" .
+ "Connection: close\r\n" .
+ "\r\n%s";
+$mock->addResponse(sprintf($response,$len_success,$html_success));
+$mock->addResponse(sprintf($response,$len_fail,$html_fail));
+
+//set mock adapter
+$mailman->request->setAdapter($mock);
+
+// success
+try {
+ $mailman->subscribe('a@example.net');
+} catch (Services_Mailman_Exception $e) {
+ echo 'Caught exception: ', $e->getMessage(), "\n";
+}
+
+// fail
+try {
+ $mailman->subscribe('a@example.net');
+} catch (Services_Mailman_Exception $e) {
+ echo 'Caught exception: ', $e->getMessage(), "\n";
+}
+
+?>
+--EXPECT--
+
+Caught exception: Error subscribing
View
51 tests/test_unsubscribe.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test for Services_Mailman unsubscribe member
+--FILE--
+<?php
+
+//settings
+$testURL = 'http://example.co.uk/mailman/admin';
+$testList = 'test_example.co.uk';
+$testPW = 'password';
+
+//get html
+$html_success = file_get_contents('members-remove-success.html');
+$len_success = strlen($html_success);
+$html_fail = file_get_contents('members-remove-fail.html');
+$len_fail = strlen($html_fail);
+
+//set mailman
+require_once 'Services/Mailman.php';
+$mailman = new Services_Mailman($testURL,$testList,$testPW);
+
+//set mock
+require_once 'HTTP/Request2/Adapter/Mock.php';
+$mock = new HTTP_Request2_Adapter_Mock();
+$response = "HTTP/1.1 200 OK\r\n" .
+ "Content-Length: %s\r\n" .
+ "Connection: close\r\n" .
+ "\r\n%s";
+$mock->addResponse(sprintf($response,$len_success,$html_success));
+$mock->addResponse(sprintf($response,$len_fail,$html_fail));
+
+//set mock adapter
+$mailman->request->setAdapter($mock);
+
+// success
+try {
+ $mailman->unsubscribe('a@example.net');
+} catch (Services_Mailman_Exception $e) {
+ echo 'Caught exception: ', $e->getMessage(), "\n";
+}
+
+// fail
+try {
+ $mailman->unsubscribe('a@example.net');
+} catch (Services_Mailman_Exception $e) {
+ echo 'Caught exception: ', $e->getMessage(), "\n";
+}
+
+?>
+--EXPECT--
+
+Caught exception: Cannot unsubscribe non-members
Please sign in to comment.
Something went wrong with that request. Please try again.