function DiffOpOutputBuilderTest::testGetDiff

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Component/Diff/DiffOpOutputBuilderTest.php \Drupal\Tests\Component\Diff\DiffOpOutputBuilderTest::testGetDiff()

@covers ::getDiff
@dataProvider provideTestDiff

File

core/tests/Drupal/Tests/Component/Diff/DiffOpOutputBuilderTest.php, line 108

Class

DiffOpOutputBuilderTest
@coversDefaultClass \Drupal\Component\Diff\DiffOpOutputBuilder[[api-linebreak]]

Namespace

Drupal\Tests\Component\Diff

Code

public function testGetDiff(array $expected, array $from, array $to) : void {
  $differ = new Differ(new DiffOpOutputBuilder());
  $diff = $differ->diff($from, $to);
  $this->assertEquals($expected, unserialize($diff));
}

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