You are here

function SkinrUpdateScriptTest::testSkinrImplementsApi in Skinr 8.2

Tests access to the update script.

File

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

Class

SkinrUpdateScriptTest
Tests caching after running the update script.

Namespace

Drupal\tracker\Tests

Code

function testSkinrImplementsApi() {

  // Build our list of extensions.
  $this
    ->drupalGet('skinr-test/skinr-implements-api');
  $this
    ->assertText('skinr_test_basetheme', 'Skins registered in $basetheme.skinr.inc found.');

  // Simulate running update script.
  $this
    ->drupalLogin($this->update_user);
  $this
    ->drupalGet($this->update_url, array(
    'query' => array(
      'drupal_root' => DRUPAL_ROOT,
    ),
    'external' => TRUE,
  ));

  // Ensure we still have correct list of skins.
  $this
    ->drupalGet('skinr-test/skinr-implements-api');
  $this
    ->assertText('skinr_test_basetheme', 'Skins registered in $basetheme.skinr.inc found.');
}