Ejemplo n.º 1
0
 /**
  * @test
  * @covers Cocur\Plum\Workflow::addElement()
  * @covers Cocur\Plum\Workflow::addConverter()
  * @covers Cocur\Plum\Workflow::getConverters()
  */
 public function addConverterWithPrependShouldPrependConverterToWorkflow()
 {
     $converter1 = $this->getMockConverter();
     $converter2 = $this->getMockConverter();
     $this->workflow->addConverter($converter1);
     $this->workflow->addConverter($converter2, null, Workflow::PREPEND);
     $this->assertSame($converter2, $this->workflow->getConverters()[0]);
     $this->assertSame($converter1, $this->workflow->getConverters()[1]);
 }