function StubSourceGeneratorPlugin::initializeIterator

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\StubSourceGeneratorPlugin::initializeIterator()
  2. 8.9.x core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\StubSourceGeneratorPlugin::initializeIterator()
  3. 10 core/modules/migrate/tests/src/Unit/MigrateSourceTest.php \Drupal\Tests\migrate\Unit\StubSourceGeneratorPlugin::initializeIterator()

Overrides StubSourcePlugin::initializeIterator

File

core/modules/migrate/tests/src/Unit/MigrateSourceTest.php, line 500

Class

StubSourceGeneratorPlugin
Defines a stubbed source plugin with a generator as iterator.

Namespace

Drupal\Tests\migrate\Unit

Code

protected function initializeIterator() : \Generator {
    (yield 'foo');
    (yield 'bar');
    (yield 'iggy');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.