1
0
mirror of synced 2024-11-28 15:46:04 +03:00
service-bundle/Tests/Messenger/MessageHandler/InNewProcessRunnerTest.php
Кривич Сергей 897df39d96 Update code base
2022-07-20 14:38:42 +03:00

28 lines
729 B
PHP

<?php
namespace RetailCrm\ServiceBundle\Tests\Messenger\MessageHandler;
use Psr\Log\NullLogger;
use RetailCrm\ServiceBundle\Messenger\MessageHandler\InNewProcessRunner;
use RetailCrm\ServiceBundle\Tests\Fixtures\App\TestCommandMessage;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
class InNewProcessRunnerTest extends KernelTestCase
{
protected function setUp(): void
{
self::bootKernel(['environment' => 'test']);
}
public function testRun(): void
{
$runner = new InNewProcessRunner(new NullLogger, self::$kernel);
ob_clean();
ob_start();
$runner->run(new TestCommandMessage());
static::assertEquals('test test test', ob_get_clean());
}
}