Inspect is a fast way to pull protected anf private properties from objects.
composer require humans/inspect --dev
function it_should_have_a_value_of_x () {
$object = new class {
private string $value = 'x';
};
$this->assertEquals('x', inspect($object)->value);
}