Skip to content

Commit

Permalink
tests, configure bypass-finals
Browse files Browse the repository at this point in the history
  • Loading branch information
brettmc committed Jan 13, 2025
1 parent a8fc516 commit 3e80235
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions tests/Unit/SDK/Common/Services/LoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,22 @@ public function priority(): int
$this->assertTrue($detector->getResource()->getAttributes()->has('foo-resource'));
$this->assertSame('foo', $detector->getResource()->getAttributes()->get('foo-resource'));
}

public function test_get_all_resource_detectors(): void
{
$detectors = Loader::resourceDetectors();
$this->assertNotEmpty($detectors);
}

public function test_missing_propagator(): void
{
$this->expectException(\RuntimeException::class);
Loader::textMapPropagator('missing');
}

public function test_missing_detector(): void
{
$this->expectException(\RuntimeException::class);
Loader::resourceDetector('missing');
}
}
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

require_once __DIR__ . '/../vendor/autoload.php';

BypassFinals::enable();
BypassFinals::enable(bypassReadOnly: false);

0 comments on commit 3e80235

Please sign in to comment.