public function testCreateWithDescription()
 {
     $parameter = new InstallerParameter('param', InstallerParameter::OPTIONAL, null, 'The description');
     $this->assertSame('param', $parameter->getName());
     $this->assertFalse($parameter->isRequired());
     $this->assertNull($parameter->getDefaultValue());
     $this->assertSame('The description', $parameter->getDescription());
 }
 private function parameterToData(InstallerParameter $parameter)
 {
     $data = new stdClass();
     if ($parameter->isRequired()) {
         $data->required = true;
     }
     if (null !== ($default = $parameter->getDefaultValue())) {
         $data->default = $default;
     }
     if ($description = $parameter->getDescription()) {
         $data->description = $description;
     }
     return $data;
 }