0

I have written a custom module for sending email to registered users. And I want simple test case for that users email module.

In this module I am taking a user from database and selected users preferred language and sending emails.

Same as I want .test file, I don't know how to write .test file for this module.

I am using the SimpleTest module, version 7.x-2.x (in Drupal 7).

1
  • i want admin can send an emails to register users by using cron in every one day,i want that test cases.
    – RaMeSh
    Aug 10, 2015 at 13:44

1 Answer 1

0

Finding documentation about the SimpleTest module has never been obvious (also because using the Read Documentation link on the module's project page causes a 404-error ...).

Here are some pointers I've found so far:

Be aware:

  • Make sure to you take into account what's written in API.txt, i.e.:

    ... Provides a reference of the API changes between SimpleTest 7.x-1.x included with Drupal 7 core and SimpleTest 7.x-2.x.

    Modules that provided 2.x compatible tests are required to add the following attribute to their info file: testing_api = 2.x.

    So SimpleTest requires a version number in the .info file, which you specify by adding that testing_api = 2.x in your .info file.

  • This module has Maintenance status: Unknown, Development status: Unknown

Note: As of D7, there is the PHP Unit Testing Framework module (namespace = testing). Refer to the Community Documentation about Testing (D7 and D8) / SimpleTest (D6) for quite some more details on all this.

3
  • i want admin can send an emails to register users by using cron in every one day,i want that test cases.
    – RaMeSh
    Aug 10, 2015 at 13:44
  • my requirement is when i am in admin,and if i am run the email custom module through simple testing,all emails are automatically send to registerred users.
    – RaMeSh
    Aug 10, 2015 at 14:02
  • Pierre can please help me on this problem,how can i write .test file?
    – RaMeSh
    Aug 10, 2015 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.