Suppose I have a class with a private property and associated public getter and setter. I want to test with PHPUnit that the property gets the correct value after the sette
You can also use Assert::assertAttributeEquals('value', 'propertyName', $object).
Assert::assertAttributeEquals('value', 'propertyName', $object)
See https://github.com/sebastianbergmann/phpunit/blob/3.7/PHPUnit/Framework/Assert.php#L490