Skip to content

Add integration test for imagify_after_optimize hook #1159

Description

@Miraeld

🤖 AI-generated — created by an automated pipeline. Review before acting on this.

Source: Follow-up from QA on #1126 (COULD_HAVE)

Context
The new classes/Tracking/Subscriber registers on imagify_after_optimize, but there is no integration test verifying the full hook-to-event-fire chain end-to-end. Currently only unit tests with mocked dependencies cover the tracking logic.

Suggestion
Add an integration test that verifies the imagify_after_optimize hook is actually registered and wired to the Subscriber, with the full stack exercised (not just mocked dependencies).

Acceptance Criteria

  • Integration test exists that fires imagify_after_optimize and verifies the Subscriber is invoked
  • Test covers the full hook-to-event chain without mocking the Subscriber
  • Test passes in CI

Development steps

  • Create integration test file in appropriate test directory
  • Set up test fixture with real Subscriber instance
  • Fire imagify_after_optimize hook with test data
  • Assert Subscriber callback was executed

Effort estimation
S / M

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions