Skip to content

Commit

Permalink
fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmason30 committed Jan 17, 2024
1 parent c065d16 commit 26fa9e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/Queue/QueueBeanstalkdQueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testPushProperlyPushesJobOntoBeanstalkd()
$this->queue->push('foo', ['data'], 'stack');
$this->queue->push('foo', ['data']);

$this->container->shouldHaveReceived('bound')->with('events')->times(2);
$this->container->shouldHaveReceived('bound')->with('events')->times(4);

Str::createUuidsNormally();
}
Expand All @@ -67,7 +67,7 @@ public function testDelayedPushProperlyPushesJobOntoBeanstalkd()
$this->queue->later(5, 'foo', ['data'], 'stack');
$this->queue->later(5, 'foo', ['data']);

$this->container->shouldHaveReceived('bound')->with('events')->times(2);
$this->container->shouldHaveReceived('bound')->with('events')->times(4);

Str::createUuidsNormally();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Queue/QueueDatabaseQueueUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testPushProperlyPushesJobOntoDatabase($uuid, $job, $displayNameS

$queue->push($job, ['data']);

$container->shouldHaveReceived('bound')->with('events')->once();
$container->shouldHaveReceived('bound')->with('events')->twice();

Str::createUuidsNormally();
}
Expand Down Expand Up @@ -87,7 +87,7 @@ public function testDelayedPushProperlyPushesJobOntoDatabase()

$queue->later(10, 'foo', ['data']);

$container->shouldHaveReceived('bound')->with('events')->once();
$container->shouldHaveReceived('bound')->with('events')->twice();

Str::createUuidsNormally();
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Queue/QueueSqsQueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function testDelayedPushWithDateTimeProperlyPushesJobOntoSqs()
$this->sqs->shouldReceive('sendMessage')->once()->with(['QueueUrl' => $this->queueUrl, 'MessageBody' => $this->mockedPayload, 'DelaySeconds' => 5])->andReturn($this->mockedSendMessageResponseModel);
$id = $queue->later($now->addSeconds(5), $this->mockedJob, $this->mockedData, $this->queueName);
$this->assertEquals($this->mockedMessageId, $id);
$container->shouldHaveReceived('bound')->with('events')->once();
$container->shouldHaveReceived('bound')->with('events')->twice();
}

public function testDelayedPushProperlyPushesJobOntoSqs()
Expand All @@ -129,7 +129,7 @@ public function testDelayedPushProperlyPushesJobOntoSqs()
$this->sqs->shouldReceive('sendMessage')->once()->with(['QueueUrl' => $this->queueUrl, 'MessageBody' => $this->mockedPayload, 'DelaySeconds' => $this->mockedDelay])->andReturn($this->mockedSendMessageResponseModel);
$id = $queue->later($this->mockedDelay, $this->mockedJob, $this->mockedData, $this->queueName);
$this->assertEquals($this->mockedMessageId, $id);
$container->shouldHaveReceived('bound')->with('events')->once();
$container->shouldHaveReceived('bound')->with('events')->twice();
}

public function testPushProperlyPushesJobOntoSqs()
Expand All @@ -141,7 +141,7 @@ public function testPushProperlyPushesJobOntoSqs()
$this->sqs->shouldReceive('sendMessage')->once()->with(['QueueUrl' => $this->queueUrl, 'MessageBody' => $this->mockedPayload])->andReturn($this->mockedSendMessageResponseModel);
$id = $queue->push($this->mockedJob, $this->mockedData, $this->queueName);
$this->assertEquals($this->mockedMessageId, $id);
$container->shouldHaveReceived('bound')->with('events')->once();
$container->shouldHaveReceived('bound')->with('events')->twice();
}

public function testSizeProperlyReadsSqsQueueSize()
Expand Down

0 comments on commit 26fa9e8

Please sign in to comment.