function MigrateExecutableTest::getMockSource
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php \Drupal\Tests\migrate\Unit\MigrateExecutableTest::getMockSource()
- 8.9.x core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php \Drupal\Tests\migrate\Unit\MigrateExecutableTest::getMockSource()
- 10 core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php \Drupal\Tests\migrate\Unit\MigrateExecutableTest::getMockSource()
Returns a mock migration source instance.
Return value
\Drupal\migrate\Plugin\MigrateSourceInterface|\PHPUnit\Framework\MockObject\MockObject The mocked migration source.
6 calls to MigrateExecutableTest::getMockSource()
- MigrateExecutableTest::testImportWithValidRow in core/
modules/ migrate/ tests/ src/ Unit/ MigrateExecutableTest.php - Tests the import method with a valid row.
- MigrateExecutableTest::testImportWithValidRowNoDestinationValues in core/
modules/ migrate/ tests/ src/ Unit/ MigrateExecutableTest.php - Tests the import method with a valid row.
- MigrateExecutableTest::testImportWithValidRowWithDestinationMigrateException in core/
modules/ migrate/ tests/ src/ Unit/ MigrateExecutableTest.php - Tests the import method with a thrown MigrateException.
- MigrateExecutableTest::testImportWithValidRowWithException in core/
modules/ migrate/ tests/ src/ Unit/ MigrateExecutableTest.php - Tests the import method with a regular Exception being thrown.
- MigrateExecutableTest::testImportWithValidRowWithoutDestinationId in core/
modules/ migrate/ tests/ src/ Unit/ MigrateExecutableTest.php - Tests the import method with a valid row.
File
-
core/
modules/ migrate/ tests/ src/ Unit/ MigrateExecutableTest.php, line 420
Class
- MigrateExecutableTest
- @coversDefaultClass \Drupal\migrate\MigrateExecutable @group migrate
Namespace
Drupal\Tests\migrate\UnitCode
protected function getMockSource() {
$source = $this->createMock(StubSourcePlugin::class);
$source->expects($this->once())
->method('rewind');
$source->expects($this->any())
->method('valid')
->willReturn(TRUE, FALSE);
return $source;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.