Ejemplo n.º 1
0
 public function getIODescriptor()
 {
     if (self::$ioDescriptor == null) {
         $builder = new IODescriptorBuilder();
         self::$ioDescriptor = $builder->requires()->streamId('IN1')->type('string')->description('First string')->uses()->streamId('IN2')->type('string')->description('Second string that gets changed to IN1_IN2')->exports()->streamId('OUT')->type('string')->description('Output string: IN2_IN1_suffix')->get();
     }
     return self::$ioDescriptor;
 }
Ejemplo n.º 2
0
 public function getIODescriptor()
 {
     if (self::$ioDescriptor == null) {
         $builder = new IODescriptorBuilder();
         self::$ioDescriptor = $builder->requires()->streamId('in')->type('string')->description('Input string')->exports()->streamId('out')->type('string')->description('Output string')->get();
     }
     return self::$ioDescriptor;
 }
Ejemplo n.º 3
0
 public function testFilterIODescriptor()
 {
     $builder = new IODescriptorBuilder();
     $descriptorExpected = $builder->requires()->streamId('IN1')->type('string')->description('First string')->uses()->streamId('IN2')->type('string')->description('Second string that gets changed to IN1_IN2')->exports()->streamId('OUT')->type('string')->description('Output string: IN2_IN1_suffix')->get();
     $context = new SimpleFilterContext();
     $filter = new FixtureFilter($context, array("suffix" => "value"));
     $descriptorActual = $filter->getIODescriptor();
     $this->assertEquals($descriptorExpected, $descriptorActual);
 }
Ejemplo n.º 4
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testFailsWhenTypeMissing()
 {
     $builder = new IODescriptorBuilder();
     $builder->exports()->streamId('ID')->get();
 }