protected function LinePatternDetectorTest::setupLibrary in Libraries API 8.3
Sets up the library prophecy and returns it.
Return value
\Prophecy\Prophecy\ObjectProphecy
3 calls to LinePatternDetectorTest::setupLibrary()
- LinePatternDetectorTest::testDetectVersion in tests/
src/ Unit/ Plugin/ libraries/ VersionDetector/ LinePatternDetectorTest.php - Tests that version detection succeeds with a version in the file.
- LinePatternDetectorTest::testDetectVersionMissingFile in tests/
src/ Unit/ Plugin/ libraries/ VersionDetector/ LinePatternDetectorTest.php - Tests that version detection fails for a missing file.
- LinePatternDetectorTest::testDetectVersionNoVersion in tests/
src/ Unit/ Plugin/ libraries/ VersionDetector/ LinePatternDetectorTest.php - Tests that version detection fails without a version in the file.
File
- tests/
src/ Unit/ Plugin/ libraries/ VersionDetector/ LinePatternDetectorTest.php, line 152
Class
- LinePatternDetectorTest
- Tests the line pattern version detector.
Namespace
Drupal\Tests\libraries\Unit\Plugin\libraries\VersionDetectorCode
protected function setupLibrary() {
$library = $this
->prophesize(VersionedLibraryInterface::class);
$library
->willImplement(LocalLibraryInterface::class);
$library
->getId()
->willReturn($this->libraryId);
$library
->getLocalPath()
->willReturn('libraries/' . $this->libraryId);
return $library;
}