protected function TamperPluginTestBase::getMockSourceDefinition in Tamper 8
Returns a mocked source definition.
Return value
\Drupal\tamper\SourceDefinitionInterface A source definition.
102 calls to TamperPluginTestBase::getMockSourceDefinition()
- ArrayFilterTest::instantiatePlugin in tests/
src/ Unit/ Plugin/ Tamper/ ArrayFilterTest.php - Instantiates a plugin.
- CastToIntTest::instantiatePlugin in tests/
src/ Unit/ Plugin/ Tamper/ CastToIntTest.php - Instantiates a plugin.
- ConvertBooleanTest::instantiatePlugin in tests/
src/ Unit/ Plugin/ Tamper/ ConvertBooleanTest.php - Instantiates a plugin.
- ConvertBooleanTest::testConvertBooleanNoMatchFalse in tests/
src/ Unit/ Plugin/ Tamper/ ConvertBooleanTest.php - Test convert to boolean no match false case.
- ConvertBooleanTest::testConvertBooleanNoMatchNull in tests/
src/ Unit/ Plugin/ Tamper/ ConvertBooleanTest.php - Test convert to boolean no match true case.
File
- tests/
src/ Unit/ Plugin/ Tamper/ TamperPluginTestBase.php, line 46
Class
- TamperPluginTestBase
- Base class for tamper plugin tests.
Namespace
Drupal\Tests\tamper\Unit\Plugin\TamperCode
protected function getMockSourceDefinition() {
$mock = $this
->createMock(SourceDefinitionInterface::class);
$mock
->expects($this
->any())
->method('getList')
->willReturn([
'foo',
'bar',
]);
return $mock;
}