You are here

public function CDNJSTest::test_setgetConfiguration in Libraries CDN API 7

@covers ::setConfiguration() @covers ::getConfiguration()

File

tests/src/Plugin/LibrariesCDN/CDNJSTest.php, line 84
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_setgetConfiguration() {
  $configuration = array(
    'test1' => 'url1',
    'test2' => 'url2',
  );
  $this->plugin
    ->setConfiguration($configuration);
  $this
    ->assertSame($configuration + array(
    'available' => NULL,
  ), $this->plugin
    ->getConfiguration());
  $this
    ->assertEquals('url2', $this->plugin
    ->getConfiguration('test2'));
  $this
    ->assertEmpty($this->plugin
    ->getConfiguration('inexistant_property'));
}