public registerProcessor ( string $fieldTypeIdentifier, |
||
$fieldTypeIdentifier | string | |
$processor |
public function registerProcessor($fieldTypeIdentifier, FieldTypeProcessor $processor)
{
$this->processors[$fieldTypeIdentifier] = $processor;
}
public function testRegisterProcessorsOverwrite() { $registry = new FieldTypeProcessorRegistry(); $processorA = $this->getAProcessorMock(); $processorB = $this->getAProcessorMock(); $registry->registerProcessor('my-type', $processorA); $registry->registerProcessor('my-type', $processorB); $this->assertSame($processorB, $registry->getProcessor('my-type')); }