Skip to content

shouldSend does not get called or change outcome of "assertNotSent" or other notification assertions #38909

Closed
@mrpritchett

Description

@mrpritchett
  • Laravel Version: 8.61.0
  • PHP Version: 8.0.3
  • Database Driver & Version: mysql 5.7

Description:

It looks like the PR:

#37930 (comment)

that gave us shouldSend() on Notification does not give us that behavior when checking assertions like assertNotSent.

Steps To Reproduce:

  • Create a new notification
  • Set shouldSend to return false
  • Create a test where that notification should send without shouldSend and try to assertNotSent based on shouldSend.
  • Test fails because notification is sent regardless of shouldSend

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions