poisonPillRead = $objectManager->get(PoisonPillReadInterface::class); $this->poisonPillCompare = $objectManager->get(PoisonPillCompareInterface::class); $this->restartConsumerCommand = $objectManager->create(RestartConsumerCommand::class); } /** * @covers \Magento\MessageQueue\Setup\Recurring * * @magentoDbIsolation enabled */ public function testChangeVersion(): void { $version = $this->poisonPillRead->getLatestVersion(); $this->runTestRestartConsumerCommand(); $this->assertEquals(false, $this->poisonPillCompare->isLatestVersion($version)); } /** * @return void */ private function runTestRestartConsumerCommand(): void { $commandTester = new CommandTester($this->restartConsumerCommand); $commandTester->execute([]); } }