public function LinePatternDetectorTest::testDetectVersion in Libraries API 8.3
Tests that version detection succeeds with a version in the file.
@dataProvider providerTestDetectVersion
@covers ::detectVersion
File
- tests/
src/ Unit/ Plugin/ libraries/ VersionDetector/ LinePatternDetectorTest.php, line 115
Class
- LinePatternDetectorTest
- Tests the line pattern version detector.
Namespace
Drupal\Tests\libraries\Unit\Plugin\libraries\VersionDetectorCode
public function testDetectVersion($configuration, $file_contents, $version) {
$library = $this
->setupLibrary();
$detector = $this
->setupDetector($configuration);
$this
->setupFile($configuration['file'], $file_contents);
$library
->setVersion($version)
->shouldBeCalled();
$detector
->detectVersion($library
->reveal());
}