Inheritance: implements ScriptFUSION\Mapper\Strategy\Strategy, implements ScriptFUSION\Porter\PorterAware, use trait ScriptFUSION\Porter\PorterAwareTrait
Example #1
0
 public function testSpecificationCallbackCanCreateSpecification()
 {
     $record = 'foo';
     $import = new SubImport(function () use($record) {
         return new StaticDataImportSpecification(new \ArrayIterator([$record]));
     });
     $import->setPorter(new Porter());
     $records = $import(null);
     self::assertSame($record, $records[0]);
 }
Example #2
0
 private function createSubImport($specification = null)
 {
     $this->subImport = $subImport = new SubImport($specification ?: MockFactory::mockImportSpecification());
     $subImport->setPorter($this->porter = \Mockery::mock(Porter::class)->shouldReceive('import')->andReturn(new \EmptyIterator())->byDefault()->getMock());
 }