diff options
author | Andrew Dolgov <[email protected]> | 2023-10-20 17:12:29 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-10-20 21:13:39 +0300 |
commit | cdd7ad020e165fe680703b6d3319b908b682fb7a (patch) | |
tree | b51eb09b7b4587e8fbc5624ac8d88d28cfcd0b04 /vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php | |
parent | 45a9ff0c88cbd33892ff16ab837e9059937d656e (diff) |
jaeger-client -> opentelemetry
Diffstat (limited to 'vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php')
-rw-r--r-- | vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php deleted file mode 100644 index e36a8de3d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -namespace Jaeger\Tests; - -use Jaeger\Scope; -use Jaeger\ScopeManager; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class ScopeTest extends TestCase -{ - /** - * @var ScopeManager|\PHPUnit\Framework\MockObject\MockObject - */ - private $scopeManager; - - /** - * @var Span|\PHPUnit\Framework\MockObject\MockObject - */ - private $span; - - function setUp(): void - { - $this->scopeManager = $this->createMock(ScopeManager::class); - $this->span = $this->createMock(Span::class); - } - - function testCloseDoNotFinishSpanOnClose() - { - $scope = new Scope($this->scopeManager, $this->span, false); - - $this->scopeManager->method('getActive')->willReturn($scope); - $this->scopeManager->expects($this->once())->method('getActive'); - $this->span->expects($this->never())->method('finish'); - $this->scopeManager->expects($this->once())->method('setActive'); - - $scope->close(); - } - - function testCloseFinishSpanOnClose() - { - $scope = new Scope($this->scopeManager, $this->span, true); - - $this->scopeManager->method('getActive')->willReturn($scope); - $this->scopeManager->expects($this->once())->method('getActive'); - $this->span->expects($this->once())->method('finish'); - $this->scopeManager->expects($this->once())->method('setActive'); - - $scope->close(); - } - - function testGetSpan() - { - $scope = new Scope($this->scopeManager, $this->span, false); - - $this->assertEquals($this->span, $scope->getSpan()); - } -} |