You are here

public function SkinrApiTestCase::testSkinrSkinDefaultsDuplicates in Skinr 8.2

Test default skin configurations (in code) with duplicates.

File

src/Tests/skinr.test, line 606
Tests for the Skinr module.

Class

SkinrApiTestCase
Tests API functionality.

Namespace

Drupal\tracker\Tests

Code

public function testSkinrSkinDefaultsDuplicates() {
  $uuid = '501ff0c3-db03-0944-9910-3a788f38097a';
  module_enable(array(
    'skinr_test_default',
  ));
  $default_skins = _skinr_skin_get_defaults();
  $this
    ->verbose(highlight_string('<?php ' . print_r($default_skins, TRUE), TRUE));

  // Clear caches.
  drupal_static_reset('_skinr_skin_get_defaults');
  module_enable(array(
    'skinr_test_default_duplicate',
  ));
  $default_skins = _skinr_skin_get_defaults();
  $this
    ->verbose(highlight_string('<?php ' . print_r($default_skins, TRUE), TRUE));
  $this
    ->assertFalse(is_array($default_skins[$uuid]), 'Default skin configuration replaced its duplicate.');

  // Clean up.
  module_disable(array(
    'skinr_test_default_duplicate',
  ));
  drupal_static_reset('_skinr_skin_get_defaults');
}