From fe780d183e01c31ba513e45eb98194d435937bfe Mon Sep 17 00:00:00 2001 From: Weslen Teche Date: Sun, 25 Feb 2024 04:09:44 -0300 Subject: [PATCH] fix: noop tracer test (#6552) --- tests/TracerFactoryTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/TracerFactoryTest.php b/tests/TracerFactoryTest.php index e2aab38..6fd10bd 100644 --- a/tests/TracerFactoryTest.php +++ b/tests/TracerFactoryTest.php @@ -165,6 +165,9 @@ public function testNoOpFactory() 'options' => [ ], ], + 'noop' => [ + 'driver' => \Hyperf\Tracer\Adapter\NoOpTracerFactory::class, + ], ], ], ]); @@ -188,6 +191,9 @@ protected function getContainer($config) $container->shouldReceive('get') ->with(\Hyperf\Tracer\Adapter\JaegerTracerFactory::class) ->andReturn(new \Hyperf\Tracer\Adapter\JaegerTracerFactory($config)); + $container->shouldReceive('get') + ->with(\Hyperf\Tracer\Adapter\NoOpTracerFactory::class) + ->andReturn(new \Hyperf\Tracer\Adapter\NoOpTracerFactory()); $container->shouldReceive('get') ->with(\Hyperf\Contract\ConfigInterface::class) ->andReturn($config);