/**
  * @test
  */
 function it_can_be_converted_to_array_and_back()
 {
     $processingTypes = ProcessingTypes::support([String::prototype(), Integer::prototype()]);
     $definition = $processingTypes->toArray();
     $copiedProcessingTypes = ProcessingTypes::fromArray($definition);
     $this->assertTrue($copiedProcessingTypes->isSupported(String::prototype()));
     $this->assertTrue($copiedProcessingTypes->isSupported(Integer::prototype()));
     $this->assertFalse($copiedProcessingTypes->isSupported(Float::prototype()));
     $allProcessingTypes = ProcessingTypes::supportAll();
     $definition = $allProcessingTypes->toArray();
     $copiedProcessingTypes = ProcessingTypes::fromArray($definition);
     $this->assertTrue($copiedProcessingTypes->isSupported(Float::prototype()));
 }
 /**
  * @return ProcessingTypes
  */
 public function supportedProcessingTypes()
 {
     $supportedProcessingTypes = $this->payload['supported_processing_types'];
     if (is_string($supportedProcessingTypes) && $supportedProcessingTypes === ProcessingTypes::SUPPORT_ALL) {
         $supportedProcessingTypes = ProcessingTypes::supportAll();
     } else {
         $supportedProcessingTypes = ProcessingTypes::support($supportedProcessingTypes);
     }
     return $supportedProcessingTypes;
 }