Skip to content

Commit

Permalink
Move TextCodectest to correct location
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahgeorge committed Jun 6, 2018
1 parent 709ee4b commit a6c9433
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 40 deletions.
23 changes: 23 additions & 0 deletions tests/Jaeger/Codec/TextCodecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,27 @@ public function testCanInjectContextInCarrier()

$this->assertFalse(empty($carrier));
}

public function testSpanContextParsingFromHeader()
{
$carrier = ['uber-trace-id' => '32834e4115071776:f7802330248418d:32834e4115071776:1'];

$spanContext = $this->textCodec->extract($carrier);

self::assertEquals("1717370599544170", $spanContext->getTraceId());
self::assertEquals("641546560935337", $spanContext->getSpanId());
self::assertEquals("1717370599544170", $spanContext->getParentId());
self::assertEquals(1, $spanContext->getFlags());
}

/**
* @expectedException Exception
* @expectedExceptionMessage Malformed tracer state string
*/
public function testInvalidSpanContextParsingFromHeader()
{
$carrier = ['uber-trace-id' => 'invalid_data'];

$this->textCodec->extract($carrier);
}
}
40 changes: 0 additions & 40 deletions tests/TextCodecTest.php

This file was deleted.

0 comments on commit a6c9433

Please sign in to comment.