Plum\Plum\WorkflowTest::addConverterWithFieldAndPrependShouldPrependValueConverterToWorkflow PHP Метод

addConverterWithFieldAndPrependShouldPrependValueConverterToWorkflow() публичный Метод

    public function addConverterWithFieldAndPrependShouldPrependValueConverterToWorkflow()
    {
        $converter1 = $this->getMockConverter();
        $converter2 = $this->getMockConverter();
        $this->workflow->addConverter(['converter' => $converter1, 'field' => ['foo']]);
        $this->workflow->addConverter(['field' => ['foo'], 'converter' => $converter2, 'position' => Workflow::PREPEND]);
        $this->assertSame($converter2, $this->workflow->getConverters()[0]->getConverter());
        $this->assertSame($converter1, $this->workflow->getConverters()[1]->getConverter());
    }
WorkflowTest