Skip to content

Commit

Permalink
Revert "Add host and user information"
Browse files Browse the repository at this point in the history
This reverts commit c0d5ee4.
  • Loading branch information
sebastianbergmann committed Jan 26, 2025
1 parent 586edbf commit 59a21f4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
16 changes: 0 additions & 16 deletions src/Event/Value/Runtime/Runtime.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
namespace PHPUnit\Event\Runtime;

use function get_current_user;
use function gethostname;
use function sprintf;

/**
Expand All @@ -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
Expand Down Expand Up @@ -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;
}
}
12 changes: 0 additions & 12 deletions tests/unit/Event/Value/Runtime/RuntimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 59a21f4

Please sign in to comment.