Skip to content

Commit

Permalink
more stats tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmastech committed Jul 7, 2024
1 parent 2c9397b commit 65a8fe7
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion tests/StatsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,35 @@

class StatsTest extends AbstractTestCase
{
#[Test]
public function getDefaultInstance_returnsConfigDefaultAdapter()
{
// Given
Config::set("statsd-adapter.default", "this-does-not-exist-but-thats-ok");

// When
$defaultInstanceString = Stats::getDefaultInstance();

// Then
self::assertEquals("this-does-not-exist-but-thats-ok", $defaultInstanceString);
}

#[Test]
public function setDefaultInstance_overridesConfigDefault()
{
// Given application is configured

// When
Stats::setDefaultInstance("yooooo");

// Then
self::assertEquals("yooooo", Stats::getDefaultInstance());
}

#[Test]
public function getFacadeRoot_returnsAdapterManager()
{
// Given facade is set up
// Given facade has been booted

// When
$facadeRoot = Stats::getFacadeRoot();
Expand Down

0 comments on commit 65a8fe7

Please sign in to comment.