public function DiffEngineTest::provideTestDiff in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/Diff/Engine/DiffEngineTest.php \Drupal\Tests\Component\Diff\Engine\DiffEngineTest::provideTestDiff()
Return value
array
- Expected output in terms of return class. A list of class names expected to be returned by DiffEngine::diff().
- An array of strings to change from.
- An array of strings to change to.
File
- core/
tests/ Drupal/ Tests/ Component/ Diff/ Engine/ DiffEngineTest.php, line 28
Class
- DiffEngineTest
- Test DiffEngine class.
Namespace
Drupal\Tests\Component\Diff\EngineCode
public function provideTestDiff() {
return [
'empty' => [
[],
[],
[],
],
'add' => [
[
DiffOpAdd::class,
],
[],
[
'a',
],
],
'copy' => [
[
DiffOpCopy::class,
],
[
'a',
],
[
'a',
],
],
'change' => [
[
DiffOpChange::class,
],
[
'a',
],
[
'b',
],
],
'copy-and-change' => [
[
DiffOpCopy::class,
DiffOpChange::class,
],
[
'a',
'b',
],
[
'a',
'c',
],
],
'copy-change-copy' => [
[
DiffOpCopy::class,
DiffOpChange::class,
DiffOpCopy::class,
],
[
'a',
'b',
'd',
],
[
'a',
'c',
'd',
],
],
'copy-change-copy-add' => [
[
DiffOpCopy::class,
DiffOpChange::class,
DiffOpCopy::class,
DiffOpAdd::class,
],
[
'a',
'b',
'd',
],
[
'a',
'c',
'd',
'e',
],
],
'copy-delete' => [
[
DiffOpCopy::class,
DiffOpDelete::class,
],
[
'a',
'b',
'd',
],
[
'a',
],
],
];
}