function DiffFormatterTest::testDiff
Tests whether op classes returned by DiffEngine::diff() match expectations.
@covers ::format
      
    
@dataProvider provideTestDiff
File
- 
              core/tests/ Drupal/ Tests/ Component/ Diff/ DiffFormatterTest.php, line 53 
Class
- DiffFormatterTest
- Test DiffFormatter classes.
Namespace
Drupal\Tests\Component\DiffCode
public function testDiff($expected, $from, $to) : void {
  $diff = new Diff($from, $to);
  $formatter = new DiffFormatter();
  $output = $formatter->format($diff);
  $this->assertEquals($expected, $output);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
