diff --git a/src/Event/Value/Runtime/Runtime.php b/src/Event/Value/Runtime/Runtime.php index 450b4c058fe..552ec98878f 100644 --- a/src/Event/Value/Runtime/Runtime.php +++ b/src/Event/Value/Runtime/Runtime.php @@ -9,8 +9,6 @@ */ namespace PHPUnit\Event\Runtime; -use function get_current_user; -use function gethostname; use function sprintf; /** @@ -23,16 +21,12 @@ private OperatingSystem $operatingSystem; private PHP $php; private PHPUnit $phpunit; - private string $hostName; - private string $userName; public function __construct() { $this->operatingSystem = new OperatingSystem; $this->php = new PHP; $this->phpunit = new PHPUnit; - $this->hostName = gethostname(); - $this->userName = get_current_user(); } public function asString(): string @@ -62,14 +56,4 @@ public function phpunit(): PHPUnit { return $this->phpunit; } - - public function hostName(): string - { - return $this->hostName; - } - - public function userName(): string - { - return $this->userName; - } } diff --git a/tests/unit/Event/Value/Runtime/RuntimeTest.php b/tests/unit/Event/Value/Runtime/RuntimeTest.php index 13892db66b7..bb28d5b98f5 100644 --- a/tests/unit/Event/Value/Runtime/RuntimeTest.php +++ b/tests/unit/Event/Value/Runtime/RuntimeTest.php @@ -9,8 +9,6 @@ */ namespace PHPUnit\Event\Runtime; -use function get_current_user; -use function gethostname; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Small; use PHPUnit\Framework\Attributes\UsesClass; @@ -44,16 +42,6 @@ public function test_has_PHPUnit(): void $this->assertSame($phpunit->versionId(), (new Runtime)->phpunit()->versionId()); } - public function testHasHostName(): void - { - $this->assertSame(gethostname(), (new Runtime)->hostName()); - } - - public function testHasUserName(): void - { - $this->assertSame(get_current_user(), (new Runtime)->userName()); - } - public function testCanBeRepresentedAsString(): void { $this->assertStringMatchesFormat(