updated contrib modules

This commit is contained in:
2019-07-09 12:22:32 +02:00
parent cc3b64a193
commit 438237e852
469 changed files with 17307 additions and 8396 deletions

View File

@@ -11,6 +11,10 @@
* You can find all conversions by searching for "moved to".
*/
class ViewsUpgradeTestCase extends ViewsSqlTest {
/**
*
*/
public static function getInfo() {
return array(
'name' => 'Views Upgrade test',
@@ -19,14 +23,21 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
);
}
/**
* {@inheritdoc}
*/
protected function setUp() {
// // To import a view the user needs use PHP for settings rights, so enable php module.
// To import a view the user needs use PHP for settings rights, so enable
// PHP module.
parent::setUp();
module_enable(array('php'));
$this->resetAll();
}
/**
*
*/
function viewsData() {
$data = parent::viewsData();
$data['views_test']['old_field_1']['moved to'] = array('views_test', 'id');
@@ -41,6 +52,9 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
return $data;
}
/**
*
*/
function debugField($field) {
$keys = array('id', 'table', 'field', 'actual_field', 'original_field', 'real_field');
$info = array();
@@ -59,8 +73,11 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
$view->update();
$view->build();
// $this->assertEqual('old_field_1', $view->field['old_field_1']->options['id'], "Id shouldn't change during conversion");
// $this->assertEqual('id', $view->field['old_field_1']->field, 'The field should change during conversion');
// $this->assertEqual('old_field_1',
// $view->field['old_field_1']->options['id'],
// "Id shouldn't change during conversion");
// $this->assertEqual('id', $view->field['old_field_1']->field,
// 'The field should change during conversion');
$this->assertEqual('id', $view->field['old_field_1']->real_field);
$this->assertEqual('views_test', $view->field['old_field_1']->table);
$this->assertEqual('old_field_1', $view->field['old_field_1']->original_field, 'The field should have stored the original_field');
@@ -70,11 +87,13 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
$view->update();
$view->build();
// $this->assertEqual('old_field_2', $view->field['old_field_2']->options['id']);
// $this->assertEqual('old_field_2',
// $view->field['old_field_2']->options['id']);
$this->assertEqual('name', $view->field['old_field_2']->real_field);
$this->assertEqual('views_test', $view->field['old_field_2']->table);
// $this->assertEqual('old_field_3', $view->filter['old_field_3']->options['id']);
// $this->assertEqual('old_field_3',
// $view->filter['old_field_3']->options['id']);
$this->assertEqual('age', $view->filter['old_field_3']->real_field);
$this->assertEqual('views_test', $view->filter['old_field_3']->table);
@@ -84,7 +103,8 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
$view->build();
$this->assertEqual('views_test', $view->base_table, 'Make sure that view->base_table gets automatically converted.');
// $this->assertEqual('id', $view->field['id']->field, 'If we move a whole table fields of this table should work, too.');
// $this->assertEqual('id', $view->field['id']->field,
// 'If we move a whole table fields of this table should work, too.');
$this->assertEqual('id', $view->field['id']->real_field, 'To run the query right the real_field has to be set right.');
$this->assertEqual('views_test', $view->field['id']->table);
}
@@ -106,8 +126,11 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
$this->assertText('Recent comments');
}
/**
*
*/
public function viewsMovedToField() {
$view = new view;
$view = new view();
$view->name = 'test_views_move_to_field';
$view->description = '';
$view->tag = '';
@@ -127,8 +150,11 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
return $view;
}
/**
*
*/
public function viewsMovedToHandler() {
$view = new view;
$view = new view();
$view->name = 'test_views_move_to_handler';
$view->description = '';
$view->tag = '';
@@ -152,8 +178,11 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
return $view;
}
/**
*
*/
public function viewsMovedToTable() {
$view = new view;
$view = new view();
$view->name = 'test_views_move_to_table';
$view->description = '';
$view->tag = '';
@@ -173,6 +202,9 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
return $view;
}
/**
*
*/
protected function viewUpgradeImport() {
$import = '
$view = new view;
@@ -272,6 +304,7 @@ class ViewsUpgradeTestCase extends ViewsSqlTest {
$handler->display->display_options["block_description"] = "Recent comments view"
;';
return $import;
return $import;
}
}