1
1
<?php
2
2
3
- namespace ZipkinTests \Unit \Propagation ;
3
+ namespace ZipkinTests \Unit \Reporters ;
4
4
5
5
use Zipkin \Reporters \JsonV2Serializer ;
6
6
use Zipkin \Recording \Span ;
@@ -17,9 +17,9 @@ public function testSpanIsSerializedSuccessfully()
17
17
$ span = Span::createFromContext ($ context , $ localEndpoint );
18
18
$ startTime = 1594044779509687 ;
19
19
$ span ->start ($ startTime );
20
- $ span ->setName ('test ' );
20
+ $ span ->setName ('Test ' );
21
21
$ span ->setKind ('CLIENT ' );
22
- $ remoteEndpoint = Endpoint::create ('service2 ' , null , '2001:0db8:85a3:0000:0000:8a2e:0370:7334 ' , 3302 );
22
+ $ remoteEndpoint = Endpoint::create ('SERVICE2 ' , null , '2001:0db8:85a3:0000:0000:8a2e:0370:7334 ' , 3302 );
23
23
$ span ->setRemoteEndpoint ($ remoteEndpoint );
24
24
$ span ->tag ('test_key ' , 'test_value ' );
25
25
$ span ->annotate ($ startTime + 100 , 'test_annotarion ' );
@@ -29,7 +29,7 @@ public function testSpanIsSerializedSuccessfully()
29
29
$ serializedSpans = $ serializer ->serialize ([$ span ]);
30
30
31
31
$ expectedSerialization = '[{ '
32
- . '"id":"186f11b67460db4d","name":"test"," traceId":"186f11b67460db4d","timestamp":1594044779509687, '
32
+ . '"id":"186f11b67460db4d","traceId":"186f11b67460db4d","timestamp":1594044779509687,"name":"test" , '
33
33
. '"duration":1000,"localEndpoint":{"serviceName":"service1","ipv4":"192.168.0.11","port":3301}, '
34
34
. '"kind":"CLIENT", '
35
35
. '"remoteEndpoint":{"serviceName":"service2","ipv6":"2001:0db8:85a3:0000:0000:8a2e:0370:7334","port":3302} '
@@ -55,7 +55,7 @@ public function testErrorTagIsNotClobberedBySpanError()
55
55
$ serializedSpans = $ serializer ->serialize ([$ span ]);
56
56
57
57
$ expectedSerialization = '[{ '
58
- . '"id":"186f11b67460db4d","name":"test"," traceId":"186f11b67460db4d","timestamp":1594044779509688, '
58
+ . '"id":"186f11b67460db4d","traceId":"186f11b67460db4d","timestamp":1594044779509688,"name":"test" , '
59
59
. '"duration":1000,"localEndpoint":{"serviceName":"service1","ipv4":"192.168.0.11","port":3301}, '
60
60
. '"tags":{"test_key":"test_value","error":"priority_error"} '
61
61
. '}] ' ;
0 commit comments