You are here

public function LinePatternDetectorTest::testDetectVersionNoVersion in Libraries API 8.3

Tests that version detection fails without a version in the file.

@dataProvider providerTestDetectVersionNoVersion

@covers ::detectVersion

File

tests/src/Unit/Plugin/libraries/VersionDetector/LinePatternDetectorTest.php, line 55

Class

LinePatternDetectorTest
Tests the line pattern version detector.

Namespace

Drupal\Tests\libraries\Unit\Plugin\libraries\VersionDetector

Code

public function testDetectVersionNoVersion($configuration, $file_contents) {
  $library = $this
    ->setupLibrary();
  $detector = $this
    ->setupDetector($configuration);
  $this
    ->setupFile($configuration['file'], $file_contents);
  $library
    ->setVersion()
    ->shouldNotBeCalled();
  $detector
    ->detectVersion($library
    ->reveal());
}