Drupal 8  8.0.2
LibraryDiscoveryParserTest Class Reference
Inheritance diagram for LibraryDiscoveryParserTest:

Public Member Functions

 testBuildByExtensionSimple ()
 
 testBuildByExtensionWithTheme ()
 
 testBuildByExtensionWithMissingLibraryFile ()
 
 testInvalidLibrariesFile ()
 
 testBuildByExtensionWithMissingInformation ()
 
 testVersion ()
 
 testNonStringVersion ()
 
 testExternalLibraries ()
 
 testDefaultCssWeights ()
 
 testJsWithPositiveWeight ()
 
 testLibraryWithCssJsSetting ()
 
 testLibraryWithDependencies ()
 
 testLibraryWithDataTypes ()
 
 testLibraryWithJavaScript ()
 
 testLibraryThirdPartyWithMissingLicense ()
 
 testLibraryWithLicenses ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 

Protected Attributes

 $libraryDiscoveryParser
 
 $cache
 
 $moduleHandler
 
 $themeManager
 
 $lock
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Asset

Member Function Documentation

setUp ( )
protected

{}

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testBuildByExtensionSimple ( )

Tests that basic functionality works for getLibraryByName.

::buildByExtension

References Drupal\moduleHandler(), Drupal\root(), and Drupal\VERSION.

Here is the call graph for this function:

testBuildByExtensionWithMissingInformation ( )

Tests that an exception is thrown when no CSS/JS/setting is specified.

Incomplete library definition for definition 'example' in extension 'example_module_missing_information'

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testBuildByExtensionWithMissingLibraryFile ( )

Tests that a module with a missing library file results in FALSE.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testBuildByExtensionWithTheme ( )

Tests that a theme can be used instead of a module.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testDefaultCssWeights ( )

Ensures that CSS weights are taken into account properly.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testExternalLibraries ( )

Tests that the version property of external libraries is handled.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testInvalidLibrariesFile ( )

Tests that an exception is thrown when a libraries file couldn't be parsed.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testJsWithPositiveWeight ( )

Ensures that you cannot provide positive weights for JavaScript libraries.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testLibraryThirdPartyWithMissingLicense ( )

Tests that an exception is thrown when license is missing when 3rd party.

Missing license information in library definition for definition 'no-license-info-but-remote' extension 'licenses_missing_information': it has a remote, but no license.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testLibraryWithCssJsSetting ( )

Tests a library with CSS/JavaScript and a setting.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testLibraryWithDataTypes ( )

Tests a library with a couple of data formats like full URL.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testLibraryWithDependencies ( )

Tests a library with dependencies.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testLibraryWithJavaScript ( )

Tests a library with JavaScript-specific flags.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testLibraryWithLicenses ( )

Tests a library with various licenses, some GPL-compatible, some not.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testNonStringVersion ( )

Tests the version property with ISO dates.

We want to make sure that versions defined in the YAML file are the same versions that are parsed.

For example, ISO dates are converted into UNIX time by the YAML parser.

::buildByExtension

References Drupal\moduleHandler(), and Drupal\root().

Here is the call graph for this function:

testVersion ( )

Tests the version property, and how it propagates to the contained assets.

::buildByExtension

References Drupal\moduleHandler(), Drupal\root(), and Drupal\VERSION.

Here is the call graph for this function:


The documentation for this class was generated from the following file: