diff --git a/.gitignore b/.gitignore index 57ae5ec2e..5e48950be 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ bin/doctrine* bin/php-cs-fixer bin/phpunit bin/sql-formatter +bin/phpstan +bin/jp.php +bin/php-parse vendor .php_cs .php_cs.cache diff --git a/.travis.yml b/.travis.yml index 68c29d067..e61e3ef82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,16 +7,22 @@ matrix: include: - php: 5.6 sudo: false - env: SYMFONY_VERSION=2.8.* FUNCTIONAL_TESTS=false + env: SYMFONY_VERSION=2.8.* UNIT_TESTS=true + - php: 7.1 + sudo: false + env: SYMFONY_VERSION=3.0.* PHPSTAN=true + - php: 7.1 + sudo: false + env: SYMFONY_VERSION=3.0.* PHP_CS_FIXER=true - php: 7.0 sudo: false - env: SYMFONY_VERSION=2.8.* FUNCTIONAL_TESTS=false + env: SYMFONY_VERSION=2.8.* UNIT_TESTS=true - php: 5.6 sudo: false - env: SYMFONY_VERSION=3.0.* FUNCTIONAL_TESTS=false SYMFONY_DEPRECATIONS_HELPER=weak + env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.0 sudo: false - env: SYMFONY_VERSION=3.0.* FUNCTIONAL_TESTS=false SYMFONY_DEPRECATIONS_HELPER=weak + env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.0 sudo: required services: docker @@ -40,5 +46,11 @@ install: - if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -b; fi script: - - if [ "$FUNCTIONAL_TESTS" = false ]; then bin/phpunit --exclude-group=functional; fi + # misssing pkg/amqp-ext pkg/job-queue pkg/redis + - if [ "$PHPSTAN" = true ]; then ./bin/phpstan analyse -l 1 -c phpstan.neon pkg/enqueue pkg/psr-queue pkg/fs pkg/simple-client; fi + - if [ "$PHPSTAN" = true ]; then ./bin/phpstan analyse -l 1 -c phpstan.neon pkg/stomp pkg/dbal pkg/enqueue-bundle pkg/null pkg/sqs pkg/test; fi + - if [ "$PHP_CS_FIXER" = true ]; then IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS; fi + - if [ "$PHP_CS_FIXER" = true ]; then ./bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"; fi + - if [ "$UNIT_TESTS" = true ]; then bin/phpunit --exclude-group=functional; fi - if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -t; fi + diff --git a/composer.json b/composer.json index cbf574fea..173f4b218 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,8 @@ "symfony/browser-kit": "^2.8|^3", "symfony/expression-language": "^2.8|^3", "friendsofphp/php-cs-fixer": "^2", - "empi89/php-amqp-stubs": "*@dev" + "empi89/php-amqp-stubs": "*@dev", + "phpstan/phpstan": "^0.7.0" }, "autoload": { "files": ["pkg/enqueue/functions_include.php"] diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 000000000..be35ef23b --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,3 @@ +parameters: + excludes_analyse: + - pkg/enqueue/Util/UUID.php \ No newline at end of file diff --git a/pkg/amqp-ext/Tests/Client/AmqpDriverTest.php b/pkg/amqp-ext/Tests/Client/AmqpDriverTest.php index dd8f9ee8b..9dfc3294b 100644 --- a/pkg/amqp-ext/Tests/Client/AmqpDriverTest.php +++ b/pkg/amqp-ext/Tests/Client/AmqpDriverTest.php @@ -367,7 +367,7 @@ public function testShouldSetupBroker() $meta = new QueueMetaRegistry($this->createDummyConfig(), [ 'default' => [], - ], 'default'); + ]); $driver = new AmqpDriver( $context, diff --git a/pkg/dbal/Tests/DbalProducerTest.php b/pkg/dbal/Tests/DbalProducerTest.php index 90781b805..fd53a6d3d 100644 --- a/pkg/dbal/Tests/DbalProducerTest.php +++ b/pkg/dbal/Tests/DbalProducerTest.php @@ -51,7 +51,7 @@ public function testShouldThrowIfDestinationOfInvalidType() $producer = new DbalProducer($this->createContextMock()); - $producer->send(new NotSupportedDestination1(''), new DbalMessage()); + $producer->send(new NotSupportedDestination1(), new DbalMessage()); } public function testShouldThrowIfInsertMessageFailed() diff --git a/pkg/enqueue-bundle/Tests/Functional/app/AppKernel.php b/pkg/enqueue-bundle/Tests/Functional/App/AppKernel.php similarity index 100% rename from pkg/enqueue-bundle/Tests/Functional/app/AppKernel.php rename to pkg/enqueue-bundle/Tests/Functional/App/AppKernel.php diff --git a/pkg/enqueue-bundle/Tests/Functional/app/CustomAppKernel.php b/pkg/enqueue-bundle/Tests/Functional/App/CustomAppKernel.php similarity index 100% rename from pkg/enqueue-bundle/Tests/Functional/app/CustomAppKernel.php rename to pkg/enqueue-bundle/Tests/Functional/App/CustomAppKernel.php diff --git a/pkg/enqueue-bundle/Tests/Functional/app/config/config.yml b/pkg/enqueue-bundle/Tests/Functional/App/config/config.yml similarity index 100% rename from pkg/enqueue-bundle/Tests/Functional/app/config/config.yml rename to pkg/enqueue-bundle/Tests/Functional/App/config/config.yml diff --git a/pkg/enqueue-bundle/Tests/Functional/app/config/custom-config.yml b/pkg/enqueue-bundle/Tests/Functional/App/config/custom-config.yml similarity index 100% rename from pkg/enqueue-bundle/Tests/Functional/app/config/custom-config.yml rename to pkg/enqueue-bundle/Tests/Functional/App/config/custom-config.yml diff --git a/pkg/enqueue-bundle/Tests/Functional/app/config/routing.yml b/pkg/enqueue-bundle/Tests/Functional/App/config/routing.yml similarity index 100% rename from pkg/enqueue-bundle/Tests/Functional/app/config/routing.yml rename to pkg/enqueue-bundle/Tests/Functional/App/config/routing.yml diff --git a/pkg/enqueue-bundle/Tests/Functional/app/console.php b/pkg/enqueue-bundle/Tests/Functional/App/console.php similarity index 100% rename from pkg/enqueue-bundle/Tests/Functional/app/console.php rename to pkg/enqueue-bundle/Tests/Functional/App/console.php diff --git a/pkg/enqueue-bundle/Tests/Functional/UseCasesTest.php b/pkg/enqueue-bundle/Tests/Functional/UseCasesTest.php index 1679793e2..02859da2d 100644 --- a/pkg/enqueue-bundle/Tests/Functional/UseCasesTest.php +++ b/pkg/enqueue-bundle/Tests/Functional/UseCasesTest.php @@ -207,7 +207,7 @@ public function testTransportConsumeMessagesCommandShouldConsumeMessage(array $e */ public static function getKernelClass() { - include_once __DIR__.'/app/CustomAppKernel.php'; + include_once __DIR__.'/App/CustomAppKernel.php'; return CustomAppKernel::class; } diff --git a/pkg/enqueue-bundle/Tests/Functional/WebTestCase.php b/pkg/enqueue-bundle/Tests/Functional/WebTestCase.php index 01596fd67..425123112 100644 --- a/pkg/enqueue-bundle/Tests/Functional/WebTestCase.php +++ b/pkg/enqueue-bundle/Tests/Functional/WebTestCase.php @@ -34,7 +34,7 @@ protected function setUp() */ public static function getKernelClass() { - include_once __DIR__.'/app/AppKernel.php'; + include_once __DIR__.'/App/AppKernel.php'; return AppKernel::class; } diff --git a/pkg/enqueue-bundle/Tests/Unit/DependencyInjection/Compiler/AddTopicMetaPassTest.php b/pkg/enqueue-bundle/Tests/Unit/DependencyInjection/Compiler/AddTopicMetaPassTest.php index a14ec3fb3..f7730ba1a 100644 --- a/pkg/enqueue-bundle/Tests/Unit/DependencyInjection/Compiler/AddTopicMetaPassTest.php +++ b/pkg/enqueue-bundle/Tests/Unit/DependencyInjection/Compiler/AddTopicMetaPassTest.php @@ -20,7 +20,7 @@ public function testShouldImplementCompilerPass() public function testCouldBeConstructedWithoutAntArguments() { - new AddTopicMetaPass([]); + new AddTopicMetaPass(); } public function testCouldBeConstructedByCreateFactoryMethod() diff --git a/pkg/enqueue/Client/Message.php b/pkg/enqueue/Client/Message.php index a34c14d68..899cc9928 100644 --- a/pkg/enqueue/Client/Message.php +++ b/pkg/enqueue/Client/Message.php @@ -63,6 +63,11 @@ class Message */ private $correlationId; + /** + * @var string + */ + private $scope; + /** * @var array */ @@ -89,7 +94,7 @@ public function getBody() } /** - * @param null|string|number|array|\JsonSerializable $body + * @param null|string|int|float|array|\JsonSerializable $body */ public function setBody($body) { diff --git a/pkg/enqueue/Consumption/Result.php b/pkg/enqueue/Consumption/Result.php index 893cb96ed..c25a12230 100644 --- a/pkg/enqueue/Consumption/Result.php +++ b/pkg/enqueue/Consumption/Result.php @@ -38,8 +38,8 @@ class Result private $reply; /** - * @param string $status - * @param string $reason + * @param mixed $status + * @param mixed $reason */ public function __construct($status, $reason = '') { diff --git a/pkg/enqueue/Tests/Client/ConsumptionExtension/SetupBrokerExtensionTest.php b/pkg/enqueue/Tests/Client/ConsumptionExtension/SetupBrokerExtensionTest.php index bb3ad8e24..457d6f7e9 100644 --- a/pkg/enqueue/Tests/Client/ConsumptionExtension/SetupBrokerExtensionTest.php +++ b/pkg/enqueue/Tests/Client/ConsumptionExtension/SetupBrokerExtensionTest.php @@ -27,7 +27,7 @@ public function testCouldBeConstructedWithRequiredArguments() public function testShouldSetupBroker() { - $logger = new NullLogger(''); + $logger = new NullLogger(); $driver = $this->createDriverMock(); $driver @@ -45,7 +45,7 @@ public function testShouldSetupBroker() public function testShouldSetupBrokerOnlyOnce() { - $logger = new NullLogger(''); + $logger = new NullLogger(); $driver = $this->createDriverMock(); $driver diff --git a/pkg/enqueue/Tests/Consumption/Exception/ConsumptionInterruptedExceptionTest.php b/pkg/enqueue/Tests/Consumption/Exception/ConsumptionInterruptedExceptionTest.php index 100f68e61..c6f608bf1 100644 --- a/pkg/enqueue/Tests/Consumption/Exception/ConsumptionInterruptedExceptionTest.php +++ b/pkg/enqueue/Tests/Consumption/Exception/ConsumptionInterruptedExceptionTest.php @@ -1,6 +1,6 @@ <?php -namespace Enqueue\Tests\Consumption; +namespace Enqueue\Tests\Consumption\Exception; use Enqueue\Consumption\Exception\ConsumptionInterruptedException; use Enqueue\Consumption\Exception\ExceptionInterface; diff --git a/pkg/enqueue/Tests/Consumption/Exception/IllegalContextModificationExceptionTest.php b/pkg/enqueue/Tests/Consumption/Exception/IllegalContextModificationExceptionTest.php index 3a91b3111..0885b500e 100644 --- a/pkg/enqueue/Tests/Consumption/Exception/IllegalContextModificationExceptionTest.php +++ b/pkg/enqueue/Tests/Consumption/Exception/IllegalContextModificationExceptionTest.php @@ -1,6 +1,6 @@ <?php -namespace Enqueue\Tests\Consumption; +namespace Enqueue\Tests\Consumption\Exception; use Enqueue\Consumption\Exception\ExceptionInterface; use Enqueue\Consumption\Exception\IllegalContextModificationException; diff --git a/pkg/enqueue/Tests/Consumption/Exception/InvalidArgumentExceptionTest.php b/pkg/enqueue/Tests/Consumption/Exception/InvalidArgumentExceptionTest.php index 652363658..296c76225 100644 --- a/pkg/enqueue/Tests/Consumption/Exception/InvalidArgumentExceptionTest.php +++ b/pkg/enqueue/Tests/Consumption/Exception/InvalidArgumentExceptionTest.php @@ -1,6 +1,6 @@ <?php -namespace Enqueue\Tests\Consumption; +namespace Enqueue\Tests\Consumption\Exception; use Enqueue\Consumption\Exception\ExceptionInterface; use Enqueue\Consumption\Exception\InvalidArgumentException; diff --git a/pkg/enqueue/Tests/Consumption/Exception/LogicExceptionTest.php b/pkg/enqueue/Tests/Consumption/Exception/LogicExceptionTest.php index 0e072bd1f..ddd258098 100644 --- a/pkg/enqueue/Tests/Consumption/Exception/LogicExceptionTest.php +++ b/pkg/enqueue/Tests/Consumption/Exception/LogicExceptionTest.php @@ -1,6 +1,6 @@ <?php -namespace Enqueue\Tests\Consumption; +namespace Enqueue\Tests\Consumption\Exception; use Enqueue\Consumption\Exception\ExceptionInterface; use Enqueue\Consumption\Exception\LogicException; diff --git a/pkg/enqueue/Tests/Consumption/QueueConsumerTest.php b/pkg/enqueue/Tests/Consumption/QueueConsumerTest.php index 961a0072b..96c8df2cd 100644 --- a/pkg/enqueue/Tests/Consumption/QueueConsumerTest.php +++ b/pkg/enqueue/Tests/Consumption/QueueConsumerTest.php @@ -366,11 +366,7 @@ public function testShouldCallOnStartExtensionMethod() ->expects($this->once()) ->method('onStart') ->with($this->isInstanceOf(Context::class)) - ->willReturnCallback(function (Context $context) use ( - $contextStub, - $messageConsumerStub, - $processorMock - ) { + ->willReturnCallback(function (Context $context) use ($contextStub) { $this->assertSame($contextStub, $context->getPsrContext()); $this->assertNull($context->getPsrConsumer()); $this->assertNull($context->getPsrProcessor()); @@ -446,7 +442,6 @@ public function testShouldCallOnBeforeReceiveExtensionMethod() $contextStub, $messageConsumerStub, $processorMock, - $expectedMessage, $queue ) { $this->assertSame($contextStub, $context->getPsrContext()); diff --git a/pkg/enqueue/Tests/Functions/DsnToConnectionFactoryFunctionTest.php b/pkg/enqueue/Tests/Functions/DsnToConnectionFactoryFunctionTest.php index 312b476ef..6ae301b26 100644 --- a/pkg/enqueue/Tests/Functions/DsnToConnectionFactoryFunctionTest.php +++ b/pkg/enqueue/Tests/Functions/DsnToConnectionFactoryFunctionTest.php @@ -1,6 +1,6 @@ <?php -namespace Enqueue\Tests\Router; +namespace Enqueue\Tests\Functions; use Enqueue\AmqpExt\AmqpConnectionFactory; use Enqueue\Fs\FsConnectionFactory; diff --git a/pkg/enqueue/Tests/Functions/DsnToContextFunctionTest.php b/pkg/enqueue/Tests/Functions/DsnToContextFunctionTest.php index 048d249b8..74e646e0f 100644 --- a/pkg/enqueue/Tests/Functions/DsnToContextFunctionTest.php +++ b/pkg/enqueue/Tests/Functions/DsnToContextFunctionTest.php @@ -1,6 +1,6 @@ <?php -namespace Enqueue\Tests\Router; +namespace Enqueue\Tests\Functions; use Enqueue\AmqpExt\AmqpContext; use Enqueue\Fs\FsContext; diff --git a/pkg/enqueue/Tests/Symfony/Client/ConsumeMessagesCommandTest.php b/pkg/enqueue/Tests/Symfony/Client/ConsumeMessagesCommandTest.php index 70e901f4a..5c9a9c681 100644 --- a/pkg/enqueue/Tests/Symfony/Client/ConsumeMessagesCommandTest.php +++ b/pkg/enqueue/Tests/Symfony/Client/ConsumeMessagesCommandTest.php @@ -195,7 +195,7 @@ private function createQueueMetaRegistry(array $destinationNames) 'aRouterProcessorName' ); - return new QueueMetaRegistry($config, $destinationNames, 'default'); + return new QueueMetaRegistry($config, $destinationNames); } /** diff --git a/pkg/fs/FsContext.php b/pkg/fs/FsContext.php index d435f8432..838d2505f 100644 --- a/pkg/fs/FsContext.php +++ b/pkg/fs/FsContext.php @@ -179,7 +179,7 @@ public function purge(PsrQueue $queue) { InvalidDestinationException::assertDestinationInstanceOf($queue, FsDestination::class); - $this->workWithFile($queue, 'c', function (FsDestination $destination, $file) use ($queue) { + $this->workWithFile($queue, 'c', function (FsDestination $destination, $file) { ftruncate($file, 0); }); } diff --git a/pkg/fs/Tests/Client/FsDriverTest.php b/pkg/fs/Tests/Client/FsDriverTest.php index c19d1efc6..e1526bd16 100644 --- a/pkg/fs/Tests/Client/FsDriverTest.php +++ b/pkg/fs/Tests/Client/FsDriverTest.php @@ -342,7 +342,7 @@ public function testShouldSetupBroker() $meta = new QueueMetaRegistry($this->createDummyConfig(), [ 'default' => [], - ], 'default'); + ]); $driver = new FsDriver( $context, diff --git a/pkg/fs/Tests/Functional/FsContextTest.php b/pkg/fs/Tests/Functional/FsContextTest.php index b0e9451ba..bdcfb341a 100644 --- a/pkg/fs/Tests/Functional/FsContextTest.php +++ b/pkg/fs/Tests/Functional/FsContextTest.php @@ -3,11 +3,17 @@ namespace Enqueue\Fs\Tests\Functional; use Enqueue\Fs\FsConnectionFactory; +use Enqueue\Fs\FsContext; use PHPUnit\Framework\TestCase; use Symfony\Component\Filesystem\Filesystem; class FsContextTest extends TestCase { + /** + * @var FsContext|null + */ + private $fsContext; + public function tearDown() { $fs = new Filesystem(); diff --git a/pkg/redis/RedisContext.php b/pkg/redis/RedisContext.php index 6dab888db..5de8a7b3a 100644 --- a/pkg/redis/RedisContext.php +++ b/pkg/redis/RedisContext.php @@ -33,7 +33,7 @@ public function __construct($redis) $this->redisFactory = $redis; } else { throw new \InvalidArgumentException(sprintf( - 'The $redis argument must be either %s or callable that returns $s once called.', + 'The $redis argument must be either %s or callable that returns %s once called.', Redis::class, Redis::class )); diff --git a/pkg/redis/Tests/Client/RedisDriverTest.php b/pkg/redis/Tests/Client/RedisDriverTest.php index 57204b256..f18c6e317 100644 --- a/pkg/redis/Tests/Client/RedisDriverTest.php +++ b/pkg/redis/Tests/Client/RedisDriverTest.php @@ -316,7 +316,7 @@ public function testShouldDoNothingOnSetupBroker() $meta = new QueueMetaRegistry(Config::create(), [ 'default' => [], - ], 'default'); + ]); $driver = new RedisDriver( $context, diff --git a/pkg/redis/Tests/RedisConsumerTest.php b/pkg/redis/Tests/RedisConsumerTest.php index c139843d6..0b44641ca 100644 --- a/pkg/redis/Tests/RedisConsumerTest.php +++ b/pkg/redis/Tests/RedisConsumerTest.php @@ -29,7 +29,7 @@ public function testShouldReturnDestinationSetInConstructorOnGetQueue() { $destination = new RedisDestination('aQueue'); - $consumer = new RedisConsumer($this->createContextMock(), $destination, 1); + $consumer = new RedisConsumer($this->createContextMock(), $destination); $this->assertSame($destination, $consumer->getQueue()); } diff --git a/pkg/redis/Tests/RedisContextTest.php b/pkg/redis/Tests/RedisContextTest.php index b143bed4d..77042dac8 100644 --- a/pkg/redis/Tests/RedisContextTest.php +++ b/pkg/redis/Tests/RedisContextTest.php @@ -38,7 +38,7 @@ public function testCouldBeConstructedWithRedisFactoryAsFirstArgument() public function testThrowIfNeitherRedisNorFactoryGiven() { $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('The $redis argument must be either Enqueue\Redis\Redis or callable that returns $s once called.'); + $this->expectExceptionMessage('The $redis argument must be either Enqueue\Redis\Redis or callable that returns Enqueue\Redis\Redis once called.'); new RedisContext(new \stdClass()); } diff --git a/pkg/stomp/Tests/Client/RabbitMqStompDriverTest.php b/pkg/stomp/Tests/Client/RabbitMqStompDriverTest.php index bcdc51cf3..6d86e2d99 100644 --- a/pkg/stomp/Tests/Client/RabbitMqStompDriverTest.php +++ b/pkg/stomp/Tests/Client/RabbitMqStompDriverTest.php @@ -51,7 +51,7 @@ public function testShouldReturnConfigObject() public function testShouldCreateAndReturnQueueInstance() { - $expectedQueue = new StompDestination('aName'); + $expectedQueue = new StompDestination(); $context = $this->createPsrContextMock(); $context @@ -86,7 +86,7 @@ public function testShouldCreateAndReturnQueueInstance() public function testShouldCreateAndReturnQueueInstanceWithHardcodedTransportName() { - $expectedQueue = new StompDestination('aName'); + $expectedQueue = new StompDestination(); $context = $this->createPsrContextMock(); $context @@ -306,7 +306,7 @@ public function testShouldThrowExceptionIfDelayIsSetButDelayPluginInstalledOptio public function testShouldSendMessageToRouter() { - $topic = new StompDestination(''); + $topic = new StompDestination(); $transportMessage = new StompMessage(); $producer = $this->createPsrProducerMock(); @@ -362,7 +362,7 @@ public function testShouldThrowExceptionIfTopicParameterIsNotSet() public function testShouldSendMessageToProcessor() { - $queue = new StompDestination(''); + $queue = new StompDestination(); $transportMessage = new StompMessage(); $producer = $this->createPsrProducerMock(); @@ -405,8 +405,8 @@ public function testShouldSendMessageToProcessor() public function testShouldSendMessageToDelayExchangeIfDelaySet() { - $queue = new StompDestination(''); - $delayTopic = new StompDestination(''); + $queue = new StompDestination(); + $delayTopic = new StompDestination(); $transportMessage = new StompMessage(); $producer = $this->createPsrProducerMock(); diff --git a/pkg/stomp/Tests/Client/StompDriverTest.php b/pkg/stomp/Tests/Client/StompDriverTest.php index 0e74d9953..187f31c0c 100644 --- a/pkg/stomp/Tests/Client/StompDriverTest.php +++ b/pkg/stomp/Tests/Client/StompDriverTest.php @@ -39,7 +39,7 @@ public function testShouldReturnConfigObject() public function testShouldCreateAndReturnQueueInstance() { - $expectedQueue = new StompDestination('aName'); + $expectedQueue = new StompDestination(); $context = $this->createPsrContextMock(); $context @@ -66,7 +66,7 @@ public function testShouldCreateAndReturnQueueInstance() public function testShouldCreateAndReturnQueueInstanceWithHardcodedTransportName() { - $expectedQueue = new StompDestination('aName'); + $expectedQueue = new StompDestination(); $context = $this->createPsrContextMock(); $context @@ -153,7 +153,7 @@ public function testShouldConvertClientMessageToTransportMessage() public function testShouldSendMessageToRouter() { - $topic = new StompDestination(''); + $topic = new StompDestination(); $transportMessage = new StompMessage(); $producer = $this->createPsrProducerMock(); @@ -207,7 +207,7 @@ public function testShouldThrowExceptionIfTopicParameterIsNotSet() public function testShouldSendMessageToProcessor() { - $queue = new StompDestination(''); + $queue = new StompDestination(); $transportMessage = new StompMessage(); $producer = $this->createPsrProducerMock();