diff --git a/infection.json b/infection.json deleted file mode 100644 index d30680e..0000000 --- a/infection.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "timeout": 10, - "source": { - "directories": [ - "src" - ] - }, - "logs": { - "text": "infection.log" - }, - "mutators": { - "@default": true - } -} diff --git a/tests/Application/Bootstrap/BootstrapTest.php b/tests/Application/Bootstrap/BootstrapTest.php index d2f23a5..2c8de60 100644 --- a/tests/Application/Bootstrap/BootstrapTest.php +++ b/tests/Application/Bootstrap/BootstrapTest.php @@ -128,7 +128,7 @@ public function boot(ContainerBuilder $containerBuilder): void $bootstrap->addExtensions(new ServiceBusExtension()); $bootstrap->addCompilerPasses(new TaggedMessageHandlersCompilerPass()); $bootstrap->importParameters(['qwerty' => 'root']); - $bootstrap->enableAutoImportMessageHandlers([__DIR__]); + $bootstrap->enableAutoImportMessageHandlers([__DIR__ . '/services']); $bootstrap->applyModules($module); $container = $bootstrap->boot(); diff --git a/tests/Application/Bootstrap/services/TestBootstrapCommand.php b/tests/Application/Bootstrap/services/TestBootstrapCommand.php new file mode 100644 index 0000000..835004a --- /dev/null +++ b/tests/Application/Bootstrap/services/TestBootstrapCommand.php @@ -0,0 +1,20 @@ + + * @license MIT + * @license https://opensource.org/licenses/MIT + */ + +declare(strict_types = 1); + +namespace ServiceBus\Tests\Application\Bootstrap\services; + +/** + * + */ +final class TestBootstrapCommand +{ +} diff --git a/tests/Application/Bootstrap/services/TestBootstrapService.php b/tests/Application/Bootstrap/services/TestBootstrapService.php new file mode 100644 index 0000000..0ae6aab --- /dev/null +++ b/tests/Application/Bootstrap/services/TestBootstrapService.php @@ -0,0 +1,37 @@ + + * @license MIT + * @license https://opensource.org/licenses/MIT + */ + +declare(strict_types = 1); + +namespace ServiceBus\Tests\Application\Bootstrap\services; + +use ServiceBus\Common\Context\ServiceBusContext; +use ServiceBus\Services\Annotations\CommandHandler; +use ServiceBus\Services\Annotations\EventListener; + +/** + * + */ +final class TestBootstrapService +{ + /** + * @CommandHandler() + */ + public function do(TestBootstrapCommand $command, ServiceBusContext $context): void + { + } + + /** + * @EventListener() + */ + public function when(TestBootstrapEvent $event, ServiceBusContext $context): void + { + } +}