Commit 6acf746
authored
Migrate PHPSpec tests to PHPUnit (#281)
## Summary
Drop PHPSpec in favor of PHPUnit. Reorganize test structure to follow
Symfony conventions.
### Changes:
- Migrate 9 PHPSpec specs to PHPUnit test classes
- Remove `phpspec/phpspec` dependency
- Upgrade to PHPUnit ^11.5 and
`matthiasnoback/symfony-dependency-injection-test` ^6.0
- Reorganize tests from `src/Bundle/test(s)/` to top-level `tests/` with
PSR-4 namespace `Sylius\Bundle\MailerBundle\Tests\`
- Move test utilities to `tests/Helper/` (renamed from Fixtures - more
accurate for utility classes)
- Remove deprecated SwiftMailer support from test utilities
- Use `testCamelCase` naming convention (PHPUnit standard) instead of
`it_snake_case` (PHPSpec style)
- Fix CI workflow env name bug (`test_no_mailers` →
`test_with_no_mailers`)
### Test structure:
```
tests/
├── Application/ # Test kernel and config (MicroKernelTrait)
├── Cli/ # CLI command tests
├── Helper/ # Test utilities (SentMessage, MessagesProvider, SentMessagesPurger)
├── Functional/ # Functional tests (DI, Compiler passes, Sender)
├── Integration/ # Integration tests (with symfony/translation)
└── Unit/
├── Bundle/ # Bundle unit tests (9 migrated from PHPSpec)
└── Component/ # Component unit tests
```
All 52 tests pass.File tree
59 files changed
+1099
-979
lines changed- .github/workflows
- src
- Bundle
- spec
- Renderer/Adapter
- Sender/Adapter
- tests/Model
- test
- bin
- Component
- spec
- Factory
- Model
- Modifier
- Provider
- Sender
- tests
- Application
- Modifier
- bin
- config
- packages
- test_with_no_mailers
- test_with_translations
- test
- templates/Email
- translations
- Cli
- Functional
- Compiler
- DependencyInjection
- Helper
- Integration/Cli
- Unit
- Bundle
- Renderer/Adapter
- Sender/Adapter
- Component
- Factory
- Model
- Modifier
- Provider
- Sender
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
59 files changed
+1099
-979
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 55 | | |
64 | 56 | | |
65 | 57 | | |
66 | | - | |
67 | | - | |
| 58 | + | |
| 59 | + | |
68 | 60 | | |
69 | 61 | | |
70 | 62 | | |
| |||
76 | 68 | | |
77 | 69 | | |
78 | 70 | | |
79 | | - | |
| 71 | + | |
80 | 72 | | |
81 | | - | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | | - | |
46 | | - | |
| 44 | + | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
| |||
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 70 | + | |
76 | 71 | | |
77 | 72 | | |
78 | 73 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 74 | + | |
| 75 | + | |
83 | 76 | | |
84 | 77 | | |
85 | 78 | | |
| |||
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
95 | | - | |
| 88 | + | |
96 | 89 | | |
97 | 90 | | |
98 | 91 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | 15 | | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
14 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | | - | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 0 additions & 87 deletions
This file was deleted.
This file was deleted.
0 commit comments