Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542

This commit is contained in:
Pantheon Automation 2015-08-27 12:03:05 -07:00 committed by Greg Anderson
parent 3b2511d96d
commit 81ccda77eb
2155 changed files with 54307 additions and 46870 deletions

View file

@ -0,0 +1,21 @@
id: d6_update_settings
label: Drupal 6 update configuration
migration_tags:
- Drupal 6
source:
plugin: variable
variables:
- update_max_fetch_attempts
- update_fetch_url
- update_notification_threshold
- update_notify_emails
- update_check_frequency
process:
'fetch/max_attempts': update_max_fetch_attempts
'fetch/url': update_fetch_url
'notification/threshold': update_notification_threshold
'notification/emails': update_notify_emails
'check/interval_days': update_check_frequency
destination:
plugin: config
config_name: update.settings

View file

@ -0,0 +1,51 @@
<?php
/**
* @file
* Contains \Drupal\update\Tests\Migrate\d6\MigrateUpdateConfigsTest.
*/
namespace Drupal\update\Tests\Migrate\d6;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade variables to update.settings.yml.
*
* @group update
*/
class MigrateUpdateConfigsTest extends MigrateDrupal6TestBase {
use SchemaCheckTestTrait;
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('update');
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->loadDumps(['Variable.php']);
$this->executeMigration('d6_update_settings');
}
/**
* Tests migration of update variables to update.settings.yml.
*/
public function testUpdateSettings() {
$config = $this->config('update.settings');
$this->assertIdentical(2, $config->get('fetch.max_attempts'));
$this->assertIdentical('http://updates.drupal.org/release-history', $config->get('fetch.url'));
$this->assertIdentical('all', $config->get('notification.threshold'));
$this->assertIdentical(array(), $config->get('notification.emails'));
$this->assertIdentical(7, $config->get('check.interval_days'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'update.settings', $config->get());
}
}

View file

@ -33,9 +33,7 @@ class UpdateFetcherTest extends UnitTestCase {
*/
protected function setUp() {
$config_factory = $this->getConfigFactoryStub(array('update.settings' => array('fetch_url' => 'http://www.example.com')));
$http_client_mock = $this->getMockBuilder('Drupal\Core\Http\Client')
->disableOriginalConstructor()
->getMock();
$http_client_mock = $this->getMock('\GuzzleHttp\ClientInterface');
$this->updateFetcher = new UpdateFetcher($config_factory, $http_client_mock);
}