You are here

public function CDNJSTest::test_getLocalFileName in Libraries CDN API 7

@covers ::getLocalFileName()

File

tests/src/Plugin/LibrariesCDN/CDNJSTest.php, line 524
Contains \Drupal\Tests\Libraries_cdn\Plugin\LibrariesCDN\CDNJSTest.

Class

CDNJSTest
@coversDefaultClass \Drupal\libraries_cdn\Plugin\LibrariesCDN\CDNJS

Namespace

Drupal\Tests\libraries_cdn\Plugin\LibrariesCDN

Code

public function test_getLocalFileName() {
  $this->plugin
    ->setLibrary('jquery');
  $filename = 'jquery.js';
  $version = 3.14;
  $this
    ->assertEquals('public://libraries/' . $this->plugin
    ->getPluginId() . '/' . $this->plugin
    ->getLibrary() . '/' . $version . '/' . $filename, $this->plugin
    ->getLocalFileName($filename, $version));
}