Problem/Motivation

After fixing #3225558: Take notify_subscriptions into account, some automated PHPUnit tests fails. This is because before this was fixed, email notifications about new content was sent to all users whether they subscribed to content or not.

However, by default, no user is subscribed to anything. After the module started to take subscriptions into account, the tests stopped sending out notification emails, this makes the assertions about the number of emails sent out, fail.

Steps to reproduce

Run Kernel tests. Observe that they fail.

Proposed resolution

Modify the setup() function for the test classes that test sending out notifications to make subscribing to the 'article' content type the default for new users that are created.

Issue fork notify-3300511

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gisle created an issue. See original summary.

  • gisle authored bf66956 on 2.0.x
    Issue #3300511 by gisle: Started repairing tests
    

gisle’s picture

Title: Make PHPUnit tests match latest version » Make PHPUnit tests subscribe users to notifications
Issue summary: View changes

Updated issue summary with a more precise description of the problem,

  • gisle authored 79ec7e4 on 2.0.x
    Issue #3300511 by gisle: First stab at fixing tests
    

gisle credited MegaChriz.

gisle’s picture

Status: Active » Fixed

Tests work again.

gisle’s picture

Issue summary: View changes

Changed issue summary, so that the "Proposed resolution" section describes the solution actually implemented.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.