File tree 3 files changed +7
-18
lines changed
3 files changed +7
-18
lines changed Original file line number Diff line number Diff line change 94
94
95
95
strategy :
96
96
fail-fast : true
97
+ matrix :
98
+ client : ['phpredis', 'predis']
97
99
98
- name : Redis Driver
100
+ name : Redis (${{ matrix.client}}) Driver
99
101
100
102
steps :
101
103
- name : Checkout code
@@ -122,6 +124,7 @@ jobs:
122
124
- name : Execute tests
123
125
run : vendor/bin/phpunit tests/Integration/Queue
124
126
env :
127
+ REDIS_CLIENT : ${{ matrix.client }}
125
128
QUEUE_CONNECTION : redis
126
129
127
130
beanstalkd :
Original file line number Diff line number Diff line change 18
18
<ini name =" memory_limit" value =" 2048M" />
19
19
<env name =" DB_CONNECTION" value =" testing" />
20
20
<!--
21
+ <env name="REDIS_CLIENT" value="phpredis" />
21
22
<env name="REDIS_HOST" value="127.0.0.1" />
22
23
<env name="REDIS_PORT" value="6379" />
23
24
-->
Original file line number Diff line number Diff line change 8
8
use Illuminate \Cache \RateLimiting \Limit ;
9
9
use Illuminate \Contracts \Queue \Job ;
10
10
use Illuminate \Contracts \Redis \Factory as Redis ;
11
- use Illuminate \Foundation \Testing \Concerns \InteractsWithRedis ;
12
11
use Illuminate \Queue \CallQueuedHandler ;
13
12
use Illuminate \Queue \InteractsWithQueue ;
14
13
use Illuminate \Queue \Middleware \RateLimitedWithRedis ;
15
14
use Illuminate \Support \Str ;
16
15
use Mockery as m ;
16
+ use Orchestra \Testbench \Attributes \RequiresEnv ;
17
17
use Orchestra \Testbench \TestCase ;
18
18
use PHPUnit \Framework \Attributes \RequiresPhpExtension ;
19
19
20
+ #[RequiresEnv('REDIS_CLIENT ' )]
20
21
#[RequiresPhpExtension('redis ' )]
21
22
class RateLimitedWithRedisTest extends TestCase
22
23
{
23
- use InteractsWithRedis;
24
-
25
- protected function setUp (): void
26
- {
27
- parent ::setUp ();
28
-
29
- $ this ->setUpRedis ();
30
- }
31
-
32
- protected function tearDown (): void
33
- {
34
- $ this ->tearDownRedis ();
35
-
36
- parent ::tearDown ();
37
- }
38
-
39
24
public function testUnlimitedJobsAreExecuted ()
40
25
{
41
26
$ rateLimiter = $ this ->app ->make (RateLimiter::class);
You can’t perform that action at this time.
0 commit comments