ValueConverterStepTest.php 514 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Ddeboer\DataImport\Tests\Step;
  3. use Ddeboer\DataImport\Step\ValueConverterStep;
  4. class ValueConverterStepTest extends \PHPUnit_Framework_TestCase
  5. {
  6. protected function setUp()
  7. {
  8. $this->filter = new ValueConverterStep();
  9. }
  10. public function testProcess()
  11. {
  12. $this->filter->add('[foo]', function($v) { return 'barfoo'; });
  13. $data = ['foo' => 'foobar'];
  14. $this->filter->process($data);
  15. $this->assertEquals(['foo' => 'barfoo'], $data);
  16. }
  17. }