Commit Graph

150 Commits

Author SHA1 Message Date
Sonali dudhia 9aed110ba0 fix: run pest()->afterAll() hooks by flushing statics after tearDownAfterClass() (#1753)
* fix: run `pest()->afterAll()` hooks by flushing statics after `tearDownAfterClass()`

Fixes #1694

Testable::tearDown()'s finally block flushed the afterAll static after
every test via TestCaseMethodFactory::tearDown(), so by the time PHPUnit
called tearDownAfterClass() (which runs after the last test's tearDown())
the hook had already been nulled out. The per-test flush was redundant:
TestCaseMethodFactory::setUp() already flushes statics before re-applying
proxies for the next test. Move the flush into tearDownAfterClass()'s
finally block instead, so it happens after the hook actually runs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* test: assert `afterAll` hooks run via isolated fixture suite

Runs a fixture suite in a subprocess and asserts both the
`pest()->afterAll()` and file-level `afterAll()` hooks ran once,
in order. Fails on unpatched 5.x (only `afterAll` is recorded).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: remove comment from afterAll hook test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix afterAll test style and refresh snapshots

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
2026-11-14 15:13:25 +05:30
nuno maduro 9714c8553f release: 5.3.1 2026-10-07 23:02:36 +04:00
nuno maduro b8c2265d66 fix: snapshot key on retry / repeat 2026-08-24 09:31:34 +01:00
Andrew Matia cfe89d20ac Fix repeat with named dataset arguments (#1769) 2026-08-16 15:08:46 +01:00
nuno maduro 42d9b777bf chore: coding style changes 2026-08-07 14:52:56 +01:00
nuno maduro 4d3d0105b7 chore: style 2026-08-06 16:02:36 +01:00
nuno maduro 872f0a50c2 fix(tia): replayable scenarios running afterEach 2026-08-04 20:19:12 +01:00
Jeffrey van Hees 047753c836 fix: key Tia results per dataset row (#1799)
The result cache was keyed `Class::method` on both sides, so every row of a
`->with()` test shared one entry and the last writer won. On replay that single
status was handed to every row.

`TestMethod::id()` already appends `#dataSetName`, and `TestCase` reaches the
same value object through `valueObjectForEvents()`, so both sides can use it.
2026-08-02 21:43:15 -04:00
nuno maduro 33e3bf2888 chore: moves to phpunit 13.2 2026-07-07 13:40:02 +01:00
nuno maduro dfb7b870af fix: retry output expected string 2026-06-11 10:12:41 +01:00
nuno maduro 536d79f765 wip 2026-05-02 19:20:55 +01:00
nuno maduro 65c0fbc528 wip 2026-05-02 19:07:41 +01:00
nuno maduro 5242803694 wip 2026-05-02 15:54:00 +01:00
nuno maduro 348b439172 wip 2026-05-02 15:15:53 +01:00
nuno maduro 4a8c2d7d78 wip 2026-05-02 15:03:44 +01:00
nuno maduro 57fd5ce042 wip 2026-05-01 21:50:56 +01:00
nuno maduro 5c08a135f7 wip 2026-05-01 21:30:44 +01:00
nuno maduro 6e0e030d71 wip 2026-05-01 21:22:33 +01:00
nuno maduro a349f53964 wip 2026-05-01 20:42:14 +01:00
nuno maduro a725e774c0 wip 2026-05-01 20:28:39 +01:00
nuno maduro 45b1d4ce20 wip 2026-05-01 19:50:54 +01:00
nuno maduro 6a434be0f6 wip 2026-04-30 20:45:36 +01:00
nuno maduro 466259646d wip 2026-04-28 22:12:42 +01:00
nuno maduro 405d8d4406 wip 2026-04-28 21:28:46 +01:00
nuno maduro 3d3c5d41ac wip 2026-04-23 12:29:24 -07:00
nuno maduro 470a5833d4 wip 2026-04-23 10:30:44 -07:00
nuno maduro c1feefbb9e wip 2026-04-23 09:44:12 -07:00
nuno maduro e876dba8ba wip 2026-04-23 09:29:56 -07:00
nuno maduro d9c18f9c02 wip 2026-04-22 09:03:10 -07:00
nuno maduro e24882c486 wip 2026-04-21 09:41:19 -07:00
nuno maduro a5915b16ab wip 2026-04-20 20:58:38 -07:00
nuno maduro 9c8033d60c feat(tia): continues to work on poc 2026-04-20 10:09:07 -07:00
nuno maduro c7e32f5d33 feat(tia): continues to work on poc 2026-04-20 10:09:07 -07:00
nuno maduro f09d6f2064 feat(tia): continues to work on poc 2026-04-20 10:09:07 -07:00
nuno maduro 1d81069a2a feat(tia): continues to work on poc 2026-04-20 10:09:07 -07:00
nuno maduro 4b9bb77b54 feat(tia): adds poc 2026-04-20 10:09:07 -07:00
nuno maduro f528bd8427 feat: adds flaky 2026-04-10 19:52:31 +01:00
dbpolito be3ff37517 Merge branch '4.x' of https://github.com/pestphp/pest into dataset_named_params 2026-03-26 18:08:26 -03:00
nuno maduro 2a80101f42 chore: update styling 2026-03-10 21:06:28 +00:00
dbpolito b081584ab6 Improvements 2026-02-11 18:09:09 -03:00
dbpolito 6966802afc Cleanup 2026-02-11 18:02:21 -03:00
dbpolito c61dcad42b Dataset Named Parameters 2026-02-11 17:57:07 -03:00
Hans van Luttikhuizen-Ross b7b16096db Specify closure this for extend 2025-10-29 11:20:08 +01:00
Nuno Maduro de4409e368 fix: before all 2025-07-25 20:54:37 -06:00
Nuno Maduro e0695a13cb feat: adds shell 2025-07-21 13:25:50 +01:00
Nuno Maduro 0355119afc fix: snapshots feedback 2025-07-06 14:29:18 +01:00
Nuno Maduro 909d778da3 fix: undefined property 2025-05-21 02:00:15 +01:00
Nuno Maduro a310796165 Fixes filtering tests 2025-04-29 11:38:33 +01:00
Punyapal Shah 4f6140fdb1 refactor: move test case initialization to a separate method in Testable trait 2025-04-20 15:37:02 +05:30
jshayes 9510d4a2f9 Change array type hint 2024-10-13 09:54:19 -04:00