getMockForAbstractClass( MessageParam::class ); TestingAccessWrapper::newFromObject( $mp )->type = ParamType::RAW; $this->assertSame( ParamType::RAW, $mp->getType() ); } public function testGetValue() { $dummy = new \stdClass; $mp = $this->getMockForAbstractClass( MessageParam::class ); TestingAccessWrapper::newFromObject( $mp )->value = $dummy; $this->assertSame( $dummy, $mp->getValue() ); } }