terminalSize = new TerminalSize(23, 80); $self->statusMessage->time = 1234567890; return $self; } public function __set(string $name, mixed $value): void { if (property_exists($this, $name)) { $this->$name = $value; } } } class EditorTest extends TestCase { use MatchesSnapshots; public function test__debugInfo(): void { $editor = MockEditor::mock(); $state = json_encode($editor->__debugInfo(), JSON_THROW_ON_ERROR); $this->assertMatchesJsonSnapshot($state); } public function testOpenPHP(): void { $editor = MockEditor::mock('test.php'); $state = json_encode($editor->__debugInfo(), JSON_THROW_ON_ERROR); $this->assertMatchesJsonSnapshot($state); } public function testOpen(): void { $editor = MockEditor::mock('src/Terminal/ffi.h'); $state = json_encode($editor->__debugInfo(), JSON_THROW_ON_ERROR); $this->assertMatchesJsonSnapshot($state); } }