Skip to content

Commit

Permalink
fixed unit tests & code style
Browse files Browse the repository at this point in the history
  • Loading branch information
zyv4yk committed Jun 11, 2024
1 parent 12a8974 commit ee0ab0b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"kwn/php-rdkafka-stubs": "^2.0.3",
"friendsofphp/php-cs-fixer": "^3.4",
"dms/phpunit-arraysubset-asserts": "^0.2.1",
"phpspec/prophecy-phpunit": "^2.0"
"phpspec/prophecy-phpunit": "^2.0",
"symfony/http-foundation": "^5.4|^6.0"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -137,4 +138,3 @@
}
}
}

6 changes: 4 additions & 2 deletions pkg/amqp-ext/Tests/Functional/AmqpCommonUseCasesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ public function testConsumerReceiveMessageFromTopicDirectly()
$this->amqpContext->declareTopic($topic);

$consumer = $this->amqpContext->createConsumer($topic);
//guard
// guard
$this->assertNull($consumer->receive(1000));

$message = $this->amqpContext->createMessage(__METHOD__);
$message->setDeliveryTag(1);

$producer = $this->amqpContext->createProducer();
$producer->send($topic, $message);
Expand All @@ -181,10 +182,11 @@ public function testConsumerReceiveMessageWithZeroTimeout()
$this->amqpContext->declareTopic($topic);

$consumer = $this->amqpContext->createConsumer($topic);
//guard
// guard
$this->assertNull($consumer->receive(1000));

$message = $this->amqpContext->createMessage(__METHOD__);
$message->setDeliveryTag(1);

$producer = $this->amqpContext->createProducer();
$producer->send($topic, $message);
Expand Down
3 changes: 1 addition & 2 deletions pkg/enqueue-bundle/Profiler/MessageQueueCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Throwable;

class MessageQueueCollector extends AbstractMessageQueueCollector
{
public function collect(Request $request, Response $response, Throwable $exception = null): void
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
$this->collectInternal($request, $response);
}
Expand Down

0 comments on commit ee0ab0b

Please sign in to comment.