/** * Create mapper source. * * @param string|SourceTypeInterface $type * @param SourceDataFactoryInterface $dataFactory * @param string $name * * @return Source */ public function create($type, SourceDataFactoryInterface $dataFactory, $name) { if (is_string($type)) { $type = $this->typeRegistry->getType($type); } return new Source($type, $dataFactory, $name); }
public function testGetType_Success() { $mockType = $this->getSourceTypeMock('tadcka_mapper'); $this->registry->add($mockType, 'tadcka_mapper'); $this->assertEquals($mockType, $this->registry->getType('tadcka_mapper')); }