/**
  * Renders a section
  *
  * @param Section $section
  *
  * @return string
  */
 public function renderSection(Section $section)
 {
     $output = sprintf("[%s]\n", $section->getName());
     foreach ($section->getProperties() as $key => $value) {
         $value = $this->normalizeValue($value);
         $output .= sprintf("%s = %s\n", $key, $value);
     }
     // Write a linefeed after sections
     $output .= "\n";
     return $output;
 }
 function it_renders_a_section(Section $section)
 {
     $section->getName()->willReturn('section');
     $section->getProperties()->willReturn(['key1' => 'value', 'key2' => true, 'key3' => ['val1', 'val2', 'val3']]);
     $this->renderSection($section)->shouldReturn("[section]\nkey1 = value\nkey2 = true\nkey3 = val1,val2,val3\n\n");
 }