99use PHPUnit \Framework \TestCase ;
1010use Psr \Container \ContainerInterface ;
1111use ReflectionClass ;
12+ use Webware \CommandBus \CommandBusInterface ;
1213use Webware \CommandBus \ConfigProvider ;
1314use Webware \CommandBus \Container \MiddlewarePipeFactory ;
1415use Webware \CommandBus \Exception \InvalidConfigurationException ;
@@ -44,7 +45,7 @@ protected function setUp(): void
4445 public function testInvokeReturnsMiddlewarePipelineInterface (): void
4546 {
4647 $ config = [
47- ConfigProvider ::class => [
48+ CommandBusInterface ::class => [
4849 ConfigProvider::MIDDLEWARE_PIPELINE_KEY => [],
4950 ],
5051 ];
@@ -81,7 +82,7 @@ public function testInvokeThrowsExceptionWhenConfigServiceNotFound(): void
8182 ($ this ->factory )($ this ->container );
8283 }
8384
84- public function testInvokeThrowsExceptionWhenConfigProviderKeyMissing (): void
85+ public function testInvokeThrowsExceptionWhenCommandBusInterfaceKeyMissing (): void
8586 {
8687 $ config = [];
8788
@@ -99,7 +100,7 @@ public function testInvokeThrowsExceptionWhenConfigProviderKeyMissing(): void
99100
100101 $ this ->expectException (InvalidConfigurationException::class);
101102 $ this ->expectExceptionMessage (
102- 'Configuration for key: $config[Webware\CommandBus\ConfigProvider ] was not found in the config service. '
103+ 'Configuration for key: $config[Webware\CommandBus\CommandBusInterface ] was not found in the config service. ' // phpcs:ignore
103104 );
104105
105106 ($ this ->factory )($ this ->container );
@@ -108,7 +109,7 @@ public function testInvokeThrowsExceptionWhenConfigProviderKeyMissing(): void
108109 public function testInvokeWithEmptyMiddlewarePipelineConfig (): void
109110 {
110111 $ config = [
111- ConfigProvider ::class => [
112+ CommandBusInterface ::class => [
112113 ConfigProvider::MIDDLEWARE_PIPELINE_KEY => [],
113114 ],
114115 ];
@@ -133,7 +134,7 @@ public function testInvokeWithEmptyMiddlewarePipelineConfig(): void
133134 public function testInvokeWithMiddlewarePipelineConfiguration (): void
134135 {
135136 $ config = [
136- ConfigProvider ::class => [
137+ CommandBusInterface ::class => [
137138 ConfigProvider::MIDDLEWARE_PIPELINE_KEY => [
138139 [
139140 'middleware ' => 'TestMiddleware1 ' ,
@@ -177,7 +178,7 @@ public function testInvokeWithMiddlewarePipelineConfiguration(): void
177178 public function testInvokeSkipsMiddlewareNotAvailableInContainer (): void
178179 {
179180 $ config = [
180- ConfigProvider ::class => [
181+ CommandBusInterface ::class => [
181182 ConfigProvider::MIDDLEWARE_PIPELINE_KEY => [
182183 [
183184 'middleware ' => 'TestMiddleware1 ' ,
@@ -220,7 +221,7 @@ public function testInvokeSkipsMiddlewareNotAvailableInContainer(): void
220221 public function testInvokeThrowsExceptionWhenMiddlewareConfigMissingMiddlewareKey (): void
221222 {
222223 $ config = [
223- ConfigProvider ::class => [
224+ CommandBusInterface ::class => [
224225 ConfigProvider::MIDDLEWARE_PIPELINE_KEY => [
225226 [
226227 'priority ' => 10 ,
@@ -253,7 +254,7 @@ public function testInvokeThrowsExceptionWhenMiddlewareConfigMissingMiddlewareKe
253254 public function testInvokeWithMiddlewareDefaultPriority (): void
254255 {
255256 $ config = [
256- ConfigProvider ::class => [
257+ CommandBusInterface ::class => [
257258 ConfigProvider::MIDDLEWARE_PIPELINE_KEY => [
258259 [
259260 'middleware ' => 'TestMiddleware1 ' ,
@@ -291,7 +292,7 @@ public function testInvokeWithMiddlewareDefaultPriority(): void
291292 public function testFactoryCanBeInvokedMultipleTimes (): void
292293 {
293294 $ config = [
294- ConfigProvider ::class => [
295+ CommandBusInterface ::class => [
295296 ConfigProvider::MIDDLEWARE_PIPELINE_KEY => [],
296297 ],
297298 ];
@@ -325,7 +326,7 @@ public function testFactoryIsCallable(): void
325326 public function testInvokeWithNonIntegerPriorityDefaultsToOne (): void
326327 {
327328 $ config = [
328- ConfigProvider ::class => [
329+ CommandBusInterface ::class => [
329330 ConfigProvider::MIDDLEWARE_PIPELINE_KEY => [
330331 [
331332 'middleware ' => 'TestMiddleware1 ' ,
0 commit comments