You are here

function LibrariesUnitTest::testLibrariesPrepareFiles in Libraries API 8.3

Tests libraries_prepare_files().

File

src/Tests/LibrariesUnitTest.php, line 34

Class

LibrariesUnitTest
Tests basic Libraries API functions.

Namespace

Drupal\libraries\Tests

Code

function testLibrariesPrepareFiles() {
  $expected = [
    'files' => [
      'js' => [
        'example.js' => [],
      ],
      'css' => [
        'example.css' => [],
      ],
      'php' => [
        'example.php' => [],
      ],
    ],
  ];
  $library = [
    'files' => [
      'js' => [
        'example.js',
      ],
      'css' => [
        'example.css',
      ],
      'php' => [
        'example.php',
      ],
    ],
  ];
  libraries_prepare_files($library, NULL, NULL);
  $this
    ->assertEqual($expected, $library, 'libraries_prepare_files() works correctly.');
}