Example #1
0
 /**
  * MapperImpl constructor.
  *
  * @param string $comparatorName Name of the comparator, default is 'IPRNo'
  * @param string $extractorName Name of the extractor to use, default is 'File'
  */
 public function __construct($comparatorName = 'IPRNo', $extractorName = 'File')
 {
     $this->_logger = new \Logger(get_class($this));
     $extractorFactory = new ExtractorFactoryImpl();
     $comparatorFactory = new ComparatorFactoryImpl();
     $this->setExtractor($extractorFactory->getExtractor($extractorName));
     $this->setComparator($comparatorFactory->getComparator($comparatorName));
 }
 public function testShouldReturnFileExtractor()
 {
     $obj = $this->factoryImpl->getComparator("IPRNo");
     $this->assertTrue($obj instanceof \Comparators\InvoicePaymentReferenceNoComparator);
 }