(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require_once dirname(__FILE__) . '/../class-ezp-cs-constants.php';
if (!class_exists('EZP_CS_Test_Utility')) {
    /**     
     * @author Bob Riley <*****@*****.**>
     * @copyright 2014 Synthetic Thought LLC
     */
    class EZP_CS_Test_Utility
    {
        public static function init()
        {
        }
        public static function add_test_subscribers($post)
        {
            if (isset($post['count'])) {
                $count = $post['count'];
                for ($c = 0; $c < $count; $c++) {
                    EZP_CS_Query_Utility::add_new_subscriber("person-{$c}", "{$c}@gmail.com");
                }
            } else {
                EZP_CS_Utility::debug('Count parameter not set for add_test_subscribers!');
            }
        }
    }
    EZP_CS_Test_Utility::init();
}
Example #2
0
 function ws_test()
 {
     $post = stripslashes_deep($_POST);
     if (isset($post['type'])) {
         $type = $post['type'];
         switch ($type) {
             case 'add_subscribers':
                 EZP_CS_Test_Utility::add_test_subscribers($post);
                 break;
             default:
                 EZP_CS_Utility::debug('ws_test: Unknown test type');
         }
     }
 }