Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
/**
* WebTest tests for gmap_test_extended.module.
*/
class GmapViewsExtendedTestCase extends DrupalWebTestCase {
protected $privileged_user;
protected $modules = array('gmap', 'gmap_test_extended', 'views', 'views_ui', 'text','options','geofield','features', 'entityreference', 'addressfield', 'location', 'location_cck', 'geophp', 'entity');
public static function getInfo() {
return array(
'name' => 'GmapViewsExtendedTestCase',
'description' => 'Test the Gmap Views Extended.',
'group' => 'GMap',
);
}
public function setUp() {
parent::setUp($this->modules);
}
//@todo remove this after http://drupal.org/node/1252310#comment-7109128 fix
protected function error($message = '', $group = 'Other', array $caller = NULL) {
if ($message == 'Undefined index: location_settings') {
// change error (Notice) to debug message
return $this->assert('debug', $message, 'Debug', $caller);
}
// @todo create follow-up
if ($message == 'Undefined index: iwq') {
// change error (Notice) to debug message
return $this->assert('debug', $message, 'Debug', $caller);
}
// @todo create follow-up
if ($message == 'Undefined index: highlight_nodearg_color') {
// change error (Notice) to debug message
return $this->assert('debug', $message, 'Debug', $caller);
}
// @todo create follow-up
if ($message == 'implode(): Invalid arguments passed') {
// change error (Notice) to debug message
return $this->assert('debug', $message, 'Debug', $caller);
}
return parent::error($message, $group, $caller);
}
public function testGmapViews() {
// login with user
$this->privileged_user = $this->drupalCreateUser(array_keys(module_invoke_all('permission')));
$this->drupalLogin($this->privileged_user);
// array for form
$edit = array();
// page view
$this->drupalPost('admin/structure/views/view/gmap_test_extended_places/edit/page', $edit, t('Save'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/page/style_plugin', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/page/style_options', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/page/relationship/field_mylocation_target_id', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/page/field/latitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/page/field/longitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/page/field/field_mygeofield', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/page/field/field_mylatitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/page/field/field_mylongitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/page/field/field_mygeofield_1', $edit, t('Apply'));
// table view
$this->drupalPost('admin/structure/views/view/gmap_test_extended_places/edit/block_table', $edit, t('Save'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_table/relationship/field_mylocation_target_id', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_table/field/latitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_table/field/longitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_table/field/field_mygeofield', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_table/field/field_mylatitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_table/field/field_mylongitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_table/field/field_mygeofield_1', $edit, t('Apply'));
// block_geofield view
$this->drupalPost('admin/structure/views/view/gmap_test_extended_places/edit/block_geofield', $edit, t('Save'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_geofield/style_plugin', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_geofield/style_options', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_geofield/relationship/field_mylocation_target_id', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_geofield/field/latitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_geofield/field/longitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_geofield/field/field_mygeofield', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_geofield/field/field_mylatitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_geofield/field/field_mylongitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_geofield/field/field_mygeofield_1', $edit, t('Apply'));
// block_location view
$this->drupalPost('admin/structure/views/view/gmap_test_extended_places/edit/block_location', $edit, t('Save'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_location/style_plugin', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_location/style_options', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_location/relationship/field_mylocation_target_id', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_location/field/latitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_location/field/longitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_location/field/field_mygeofield', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_location/field/field_mylatitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_location/field/field_mylongitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_location/field/field_mygeofield_1', $edit, t('Apply'));
// block_field view
$this->drupalPost('admin/structure/views/view/gmap_test_extended_places/edit/block_field', $edit, t('Save'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_field/style_plugin', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_field/style_options', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_field/relationship/field_mylocation_target_id', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_field/field/latitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_field/field/longitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_field/field/field_mygeofield', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_field/field/field_mylatitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_field/field/field_mylongitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_field/field/field_mygeofield_1', $edit, t('Apply'));
// block_2 view
$this->drupalPost('admin/structure/views/view/gmap_test_extended_places/edit/block_2', $edit, t('Save'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_2/style_plugin', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_2/style_options', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_2/relationship/field_mylocation_target_id', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_2/field/latitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_2/field/longitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_2/field/field_mygeofield', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_2/field/field_mylatitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_2/field/field_mylongitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_2/field/field_mygeofield_1', $edit, t('Apply'));
// block_3 view
$this->drupalPost('admin/structure/views/view/gmap_test_extended_places/edit/block_3', $edit, t('Save'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_3/style_plugin', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/display/gmap_test_extended_places/block_3/style_options', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_3/relationship/field_mylocation_target_id', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_3/field/latitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_3/field/longitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_3/field/field_mygeofield', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_3/field/field_mylatitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_3/field/field_mylongitude', $edit, t('Apply'));
$this->drupalPost('admin/structure/views/nojs/config-item/gmap_test_extended_places/block_3/field/field_mygeofield_1', $edit, t('Apply'));
}
}