function DiffOpOutputBuilderTest::testGetDiff

Same name in other branches
  1. 10 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

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.