Commit b55061c
committed
Drop the message argument from assertArchRule()
An ArchRule cannot be built without because(), and the reason it carries is
already rendered in the failure message, so the argument was a second place
to write the same sentence and a chance for the two to drift apart.
PHPUnit's message convention earns its keep on assertTrue() and friends,
which have no domain context to report. This constraint has plenty, and with
one rule per test method the test name identifies the assertion already.
Callers who really need to prepend something can use assertThat() with the
constraint, which is the right level for an escape hatch.
The test that covered the argument now asserts what replaces it: that the
reason passed to because() reaches the failure message.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FE8ESEV7TzGLDwJuTfdq951 parent f95ae82 commit b55061c
3 files changed
Lines changed: 14 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | | - | |
| 27 | + | |
24 | 28 | | |
25 | | - | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments