MappingStepTest.php 481 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Ddeboer\DataImport\Tests\Step;
  3. use Ddeboer\DataImport\Step\MappingStep;
  4. class MappingStepTest extends \PHPUnit_Framework_TestCase
  5. {
  6. protected function setUp()
  7. {
  8. $this->filter = new MappingStep();
  9. }
  10. public function testProcess()
  11. {
  12. $this->filter->map('[foo]', '[bar]');
  13. $data = [
  14. 'foo' => '1',
  15. ];
  16. $this->filter->process($data);
  17. $this->assertEquals(['bar' => '1'], $data);
  18. }
  19. }