Functions\when('WP_Query') cannot intercept 'new WP_Query()' class
instantiation — Brain\Monkey only patches global functions, not
constructor calls. The board data provider's instanceof WP_Post check
also filtered out all stdClass mocks.
Fix:
- Add WP_Query:: static FIFO to bootstrap so tests
can inject WP_Post arrays per-test without Brain\Monkey.
- Add WP_Post stub class to bootstrap (safe: not a function, no
Patchwork conflict).
- Update BoardDataProviderTest to use WP_Post instances + queue
instead of Functions\when('WP_Query').
Agent-Session: phase2-admin-m1-engineer
7.2 KiB
7.2 KiB