Commit 4d552d4
committed
fix(tests): EventListenersTest must extend package TestCase
EventListenersTest was extending Orchestra\Testbench\TestCase
directly instead of our PHPeek\LaravelQueueMetrics\Tests\TestCase.
This caused:
1. Tests to bypass our getEnvironmentSetUp() that disables metrics
2. defineEnvironment() to enable metrics without Redis check
3. Tests to attempt Redis connection even without REDIS_AVAILABLE
4. Connection refused errors when running without Redis service
Changes:
- Use PHPeek\LaravelQueueMetrics\Tests\TestCase as base class
- Call parent::defineEnvironment() to inherit config disabling
- Remove duplicate getPackageProviders() (inherited from base)
- Tests now properly skip when REDIS_AVAILABLE env var not set
Result:
- 124 tests pass with --exclude-group=redis,arch (was 118)
- No Redis connection errors when running without Redis
- EventListenersTest properly skips all 3 tests without Redis1 parent b54f6c3 commit 4d552d4
1 file changed
+3
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 30 | | |
39 | 31 | | |
| 32 | + | |
| 33 | + | |
40 | 34 | | |
41 | 35 | | |
42 | 36 | | |
| |||
0 commit comments