You are here

function SkinrUpdateScriptTest::testSkinrImplementsApi in Skinr 7.2

Tests access to the update script.

File

tests/skinr.test, line 877
Tests for the Skinr module.

Class

SkinrUpdateScriptTest
Tests caching after running the update script.

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.');
}