public function testAvailableFormats()
 {
     $availableFormats = Format::getAvailable();
     $this->assertCount(2, $availableFormats);
     $this->assertContains('json', $availableFormats);
     $this->assertContains('xml', $availableFormats);
 }
 /**
  * @param ArrayNodeDefinition $node
  */
 private function addOutputFormatNode(ArrayNodeDefinition $node)
 {
     $node->children()->arrayNode('output_formats')->defaultValue([Format::getDefault()])->prototype('scalar')->validate()->ifNotInArray(Format::getAvailable())->thenInvalid('Formats can only contain "' . implode('"', Format::getAvailable()) . '", not "%s"')->end()->end()->end();
 }