Skip to content

Commit

Permalink
Refactor ReadPhpConfigEventTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Aug 10, 2023
1 parent 1cae26f commit 7399d5f
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions tests/Unit/Framework/Event/ConfigReader/ReadPhpConfigEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,26 @@

final class ReadPhpConfigEventTest extends TestCase
{
public function test_to_string(): void
{
$event = new ReadPhpConfigEvent('absolute/path');
private ReadPhpConfigEvent $event;

self::assertStringContainsString('{absolutePath:"absolute/path"}', $event->toString());
protected function setUp(): void
{
$this->event = new ReadPhpConfigEvent('absolute/path');
}

public function test_absolute_path(): void
{
$event = new ReadPhpConfigEvent('absolute/path');
self::assertSame(
'absolute/path',
$this->event->absolutePath(),
);
}

self::assertSame('absolute/path', $event->absolutePath());
public function test_to_string(): void
{
self::assertStringContainsString(
'{absolutePath:"absolute/path"}',
$this->event->toString(),
);
}
}

0 comments on commit 7399d5f

Please sign in to comment.