UpdatesWith7xTest.php in Zircon Profile 8
File
core/modules/system/src/Tests/Update/UpdatesWith7xTest.php
View source
<?php
namespace Drupal\system\Tests\Update;
use Drupal\simpletest\WebTestBase;
class UpdatesWith7xTest extends WebTestBase {
public static $modules = array(
'update_test_with_7x',
);
private $updateUrl;
private $updateUser;
protected function setUp() {
parent::setUp();
require_once \Drupal::root() . '/core/includes/update.inc';
$this->updateUrl = $GLOBALS['base_url'] . '/update.php';
$this->updateUser = $this
->drupalCreateUser(array(
'administer software updates',
));
}
function testWith7x() {
$this
->assertEqual(drupal_get_installed_schema_version('update_test_with_7x'), 8000);
drupal_set_installed_schema_version('update_test_with_7x', 7110);
$this
->drupalLogin($this->updateUser);
$this
->drupalGet($this->updateUrl, array(
'external' => TRUE,
));
$this
->clickLink(t('Continue'));
$this
->assertText(t('Some of the pending updates cannot be applied because their dependencies were not met.'));
}
}
Classes
Name |
Description |
UpdatesWith7xTest |
Tests that the minimum schema version is correct even if only 7.x update
hooks are retained . |