Skip to content

Commit 38f3ef4

Browse files
committed
tests(http-server): improves test naming for client and middleware.
1 parent 04b36a6 commit 38f3ef4

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/Zipkin/Instrumentation/Http/Client/Psr18/Client.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ final class Client implements ClientInterface
4242
*/
4343
private $requestSampler;
4444

45-
public function __construct(
46-
ClientInterface $delegate,
47-
HttpClientTracing $tracing
48-
) {
49-
$this->delegate = $delegate;
45+
public function __construct(ClientInterface $client, HttpClientTracing $tracing)
46+
{
47+
$this->delegate = $client;
5048
$this->injector = $tracing->getTracing()->getPropagation()->getInjector(new RequestHeaders());
5149
$this->tracer = $tracing->getTracing()->getTracer();
5250
$this->parser = $tracing->getParser();

src/Zipkin/Instrumentation/Http/Server/Psr15/Middleware.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class Middleware implements MiddlewareInterface
2727
private $tracer;
2828

2929
/**
30-
* @var callable
30+
* @var callable(ServerRequestInterface):SamplingFlags
3131
*/
3232
private $extractor;
3333

@@ -37,7 +37,7 @@ final class Middleware implements MiddlewareInterface
3737
private $parser;
3838

3939
/**
40-
* @var callable|null
40+
* @var (callable(ServerRequestInterface):?bool)|null
4141
*/
4242
private $requestSampler;
4343

tests/Integration/Instrumentation/Http/Server/MiddlewareTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static function () use ($tracer, $reporter): array {
4444
];
4545
}
4646

47-
public function testMiddleware()
47+
public function testMiddlewareRecordsRequestSuccessfully()
4848
{
4949
$parser = new class() extends DefaultParser {
5050
public function request($request, TraceContext $context, SpanCustomizer $span): void

0 commit comments

Comments
 (0)