You are here

public function UpdateUploadTest::testUpdateDirectory in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/update/src/Tests/UpdateUploadTest.php \Drupal\update\Tests\UpdateUploadTest::testUpdateDirectory()

Tests only an *.info.yml file are detected without supporting files.

File

core/modules/update/src/Tests/UpdateUploadTest.php, line 189
Contains \Drupal\update\Tests\UpdateUploadTest.

Class

UpdateUploadTest
Tests the Update Manager module's upload and extraction functionality.

Namespace

Drupal\update\Tests

Code

public function testUpdateDirectory() {
  $type = Updater::getUpdaterFromDirectory(\Drupal::root() . '/core/modules/update/tests/modules/aaa_update_test');
  $this
    ->assertEqual($type, 'Drupal\\Core\\Updater\\Module', 'Detected a Module');
  $type = Updater::getUpdaterFromDirectory(\Drupal::root() . '/core/modules/update/tests/themes/update_test_basetheme');
  $this
    ->assertEqual($type, 'Drupal\\Core\\Updater\\Theme', 'Detected a Theme.');
}