@@ -73,50 +73,6 @@ public function testTraceMetaFunctionWithActiveSpan(): void
7373 $ this ->assertSame ('<meta name="sentry-trace" content="a3c01c41d7b94b90aee23edac90f4319-e69c2aef0ec34f2a-1" /> ' , $ environment ->render ('foo.twig ' ));
7474 }
7575
76- public function testW3CTraceMetaFunctionWithNoActiveSpan (): void
77- {
78- $ environment = new Environment (new ArrayLoader (['foo.twig ' => '{{ sentry_w3c_trace_meta() }} ' ]));
79- $ environment ->addExtension (new SentryExtension ());
80-
81- $ propagationContext = PropagationContext::fromDefaults ();
82- $ propagationContext ->setTraceId (new TraceId ('566e3688a61d4bc888951642d6f14a19 ' ));
83- $ propagationContext ->setSpanId (new SpanId ('566e3688a61d4bc8 ' ));
84-
85- $ hub = new Hub (null , new Scope ($ propagationContext ));
86-
87- SentrySdk::setCurrentHub ($ hub );
88-
89- $ this ->assertSame ('<meta name="traceparent" content="00-566e3688a61d4bc888951642d6f14a19-566e3688a61d4bc8-00" /> ' , $ environment ->render ('foo.twig ' ));
90- }
91-
92- public function testW3CTraceMetaFunctionWithActiveSpan (): void
93- {
94- $ environment = new Environment (new ArrayLoader (['foo.twig ' => '{{ sentry_w3c_trace_meta() }} ' ]));
95- $ environment ->addExtension (new SentryExtension ());
96-
97- $ client = $ this ->createMock (ClientInterface::class);
98- $ client ->expects ($ this ->atLeastOnce ())
99- ->method ('getOptions ' )
100- ->willReturn (new Options ([
101- 'traces_sample_rate ' => 1.0 ,
102- 'release ' => '1.0.0 ' ,
103- 'environment ' => 'development ' ,
104- ]));
105-
106- $ hub = new Hub ($ client );
107-
108- SentrySdk::setCurrentHub ($ hub );
109-
110- $ transaction = new Transaction (new TransactionContext ());
111- $ transaction ->setTraceId (new TraceId ('a3c01c41d7b94b90aee23edac90f4319 ' ));
112- $ transaction ->setSpanId (new SpanId ('e69c2aef0ec34f2a ' ));
113- $ transaction ->setSampled (true );
114-
115- $ hub ->setSpan ($ transaction );
116-
117- $ this ->assertSame ('<meta name="traceparent" content="00-a3c01c41d7b94b90aee23edac90f4319-e69c2aef0ec34f2a-01" /> ' , $ environment ->render ('foo.twig ' ));
118- }
119-
12076 public function testBaggageMetaFunctionWithNoActiveSpan (): void
12177 {
12278 $ environment = new Environment (new ArrayLoader (['foo.twig ' => '{{ sentry_baggage_meta() }} ' ]));
0 commit comments