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/Reporter | |
parent | 45a9ff0c88cbd33892ff16ab837e9059937d656e (diff) |
jaeger-client -> opentelemetry
Diffstat (limited to 'vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter')
5 files changed, 0 insertions, 182 deletions
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php deleted file mode 100644 index ef95ebfe7..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\CompositeReporter; -use Jaeger\Reporter\ReporterInterface; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class CompositeReporterTest extends TestCase -{ - /** @var CompositeReporter */ - private $reporter; - - /** @var ReporterInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $childReporter1; - - /** @var ReporterInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $childReporter2; - - /** - * {@inheritdoc} - */ - public function setUp(): void - { - $this->childReporter1 = $this->createMock(ReporterInterface::class); - $this->childReporter2 = $this->createMock(ReporterInterface::class); - - $this->reporter = new CompositeReporter($this->childReporter1, $this->childReporter2); - } - - /** @test */ - public function shouldReportSpan() - { - /** @var \Jaeger\Span|\PHPUnit\Framework\MockObject\MockObject $span */ - $span = $this->createMock(Span::class); - - $this->childReporter1->expects($this->once())->method('reportSpan')->with($span); - $this->childReporter2->expects($this->once())->method('reportSpan')->with($span); - - $this->reporter->reportSpan($span); - } - - /** @test */ - public function shouldCloseReporter() - { - $this->childReporter1->expects($this->once())->method('close'); - $this->childReporter2->expects($this->once())->method('close'); - - $this->reporter->close(); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php deleted file mode 100644 index 966a62fa4..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\InMemoryReporter; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class InMemoryReporterTest extends TestCase -{ - /** @test */ - public function shouldReportSpan() - { - /** @var \Jaeger\Span|\PHPUnit\Framework\MockObject\MockObject $span */ - $span = $this->createMock(Span::class); - $reporter = new InMemoryReporter(); - - $reporter->reportSpan($span); - $reporter->close(); - - $spans = $reporter->getSpans(); - $this->assertEquals([$span], $spans); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php deleted file mode 100644 index dc7c490d2..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\LoggingReporter; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; -use Psr\Log\NullLogger; - -class LoggingReporterTest extends TestCase -{ - /** @test */ - public function shouldReportSpan() - { - /** - * @var NullLogger|\PHPUnit\Framework\MockObject\MockObject v - * @var Span|\PHPUnit\Framework\MockObject\MockObject $span - */ - $logger = $this->createMock(NullLogger::class); - $span = $this->createMock(Span::class); - - $reporter = new LoggingReporter($logger); - - $logger->expects($this->once()) - ->method('debug') - ->with($this->stringStartsWith('Reporting span')); - - $reporter->reportSpan($span); - $reporter->close(); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php deleted file mode 100644 index e6a66cb8a..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\NullReporter; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class NullReporterTest extends TestCase -{ - /** - * Nothing to test because NullReporter doing nothing. - * - * @test - */ - public function shouldReportSpan() - { - /** @var \Jaeger\Span|\PHPUnit\Framework\MockObject\MockObject $span */ - $span = $this->createMock(Span::class); - - $reporter = new NullReporter(); - - $reporter->reportSpan($span); - $reporter->close(); - - // Only needed to avoid PhpUnit message: "This test did not perform any assertions" - $this->assertTrue(true); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php deleted file mode 100644 index 0b85f06d0..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\RemoteReporter; -use Jaeger\Sender\UdpSender; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class RemoteReporterTest extends TestCase -{ - /** @var RemoteReporter */ - private $reporter; - - /** @var UdpSender|\PHPUnit\Framework\MockObject\MockObject */ - private $transport; - - /** - * {@inheritdoc} - */ - public function setUp(): void - { - $this->transport = $this->createMock(UdpSender::class); - $this->reporter = new RemoteReporter($this->transport); - } - - /** @test */ - public function shouldReportSpan() - { - /** @var Span|\PHPUnit\Framework\MockObject\MockObject $span */ - $span = $this->createMock(Span::class); - - $this->transport->expects($this->once())->method('append')->with($span); - - $this->reporter->reportSpan($span); - } - - /** @test */ - public function shouldCloseReporter() - { - $this->transport->expects($this->once())->method('flush'); - $this->transport->expects($this->once())->method('close'); - - $this->reporter->close(); - } -} |