You are here

public function SkinTest::testReplaceMent in Forena Reports 8

Test library creation

File

tests/src/Unit/SkinTest.php, line 32

Class

SkinTest
@group Forena @require module forena @coversDefaultClass \Drupal\forena\Skin

Namespace

Drupal\Tests\forena\Unit

Code

public function testReplaceMent() {

  // Make sure the skin loads
  $skin = Skin::instance('default');
  $this
    ->assertObjectHasAttribute('info', $skin);

  // Examine the Library
  $info = $skin
    ->replacedInfo();
  $library = $info['library'];
  $css = $library['css']['component'];
  $this
    ->assertArrayNotHasKey('{skin.dir}/default_skin.css', $css);
  $keys = array_keys($css);
  $key = reset($keys);
  $this
    ->assertContains('reports/default_skin.css', $key);
}