Skip to content

Commit

Permalink
Fix class name conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
paras-malhotra committed Oct 14, 2020
1 parent 3ca20ce commit 49c8b3d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/Integration/Queue/RateLimitsJobsWithRedisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testUnlimitedJobsAreExecuted()
{
$rateLimiter = $this->app->make(RateLimiter::class);

$testJob = new RateLimitedTestJob;
$testJob = new RedisRateLimitedTestJob;

$rateLimiter->for($testJob->key, function ($job) {
return Limit::none();
Expand All @@ -56,7 +56,7 @@ public function testRateLimitedJobsAreNotExecutedOnLimitReached()
{
$rateLimiter = $this->app->make(RateLimiter::class);

$testJob = new RateLimitedTestJob;
$testJob = new RedisRateLimitedTestJob;

$rateLimiter->for($testJob->key, function ($job) {
return Limit::perMinute(1);
Expand All @@ -70,7 +70,7 @@ public function testJobsCanHaveConditionalRateLimits()
{
$rateLimiter = $this->app->make(RateLimiter::class);

$adminJob = new AdminTestJob;
$adminJob = new RedisAdminTestJob;

$rateLimiter->for($adminJob->key, function ($job) {
if ($job->isAdmin()) {
Expand All @@ -83,7 +83,7 @@ public function testJobsCanHaveConditionalRateLimits()
$this->assertJobRanSuccessfully($adminJob);
$this->assertJobRanSuccessfully($adminJob);

$nonAdminJob = new NonAdminTestJob;
$nonAdminJob = new RedisNonAdminTestJob;

$rateLimiter->for($nonAdminJob->key, function ($job) {
if ($job->isAdmin()) {
Expand Down Expand Up @@ -136,7 +136,7 @@ protected function assertJobWasReleased($testJob)
}
}

class RateLimitedTestJob
class RedisRateLimitedTestJob
{
use InteractsWithQueue, Queueable;

Expand All @@ -160,15 +160,15 @@ public function middleware()
}
}

class AdminTestJob extends RateLimitedTestJob
class RedisAdminTestJob extends RedisRateLimitedTestJob
{
public function isAdmin()
{
return true;
}
}

class NonAdminTestJob extends RateLimitedTestJob
class RedisNonAdminTestJob extends RedisRateLimitedTestJob
{
public function isAdmin()
{
Expand Down

0 comments on commit 49c8b3d

Please sign in to comment.