PHPUnit: private property の値をテストする

$this->getHiddenProperty() を利用する

class Hoge
{
    private $hidden;
final class HogeTest extends TestCase
{
    /**
     * @test
     */
     public function プライペートプロパティのテスト()
    {
        $hoge = new Hoge();

        $this->assertEquals(
            'expected value',
            $this->getHiddenProperty($hoge, 'hidden')->getValue($hoge)
        );