Mercurial > hg > isophonics-drupal-site
comparison core/modules/node/tests/src/Functional/PagePreviewTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | |
children | af1871eacc83 |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Tests\node\Functional; | |
4 | |
5 use Drupal\comment\Tests\CommentTestTrait; | |
6 use Drupal\Core\Field\FieldStorageDefinitionInterface; | |
7 use Drupal\Core\Language\LanguageInterface; | |
8 use Drupal\Core\Url; | |
9 use Drupal\field\Entity\FieldConfig; | |
10 use Drupal\field\Entity\FieldStorageConfig; | |
11 use Drupal\node\Entity\NodeType; | |
12 use Drupal\taxonomy\Entity\Term; | |
13 use Drupal\taxonomy\Entity\Vocabulary; | |
14 use Drupal\Tests\field\Traits\EntityReferenceTestTrait; | |
15 use Drupal\Tests\TestFileCreationTrait; | |
16 | |
17 /** | |
18 * Tests the node entity preview functionality. | |
19 * | |
20 * @group node | |
21 */ | |
22 class PagePreviewTest extends NodeTestBase { | |
23 | |
24 use EntityReferenceTestTrait; | |
25 use CommentTestTrait; | |
26 use TestFileCreationTrait { | |
27 getTestFiles as drupalGetTestFiles; | |
28 } | |
29 | |
30 /** | |
31 * Enable the comment, node and taxonomy modules to test on the preview. | |
32 * | |
33 * @var array | |
34 */ | |
35 public static $modules = ['node', 'taxonomy', 'comment', 'image', 'file', 'text', 'node_test', 'menu_ui']; | |
36 | |
37 /** | |
38 * The name of the created field. | |
39 * | |
40 * @var string | |
41 */ | |
42 protected $fieldName; | |
43 | |
44 protected function setUp() { | |
45 parent::setUp(); | |
46 $this->addDefaultCommentField('node', 'page'); | |
47 | |
48 $web_user = $this->drupalCreateUser(['edit own page content', 'create page content', 'administer menu']); | |
49 $this->drupalLogin($web_user); | |
50 | |
51 // Add a vocabulary so we can test different view modes. | |
52 $vocabulary = Vocabulary::create([ | |
53 'name' => $this->randomMachineName(), | |
54 'description' => $this->randomMachineName(), | |
55 'vid' => $this->randomMachineName(), | |
56 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, | |
57 'help' => '', | |
58 ]); | |
59 $vocabulary->save(); | |
60 | |
61 $this->vocabulary = $vocabulary; | |
62 | |
63 // Add a term to the vocabulary. | |
64 $term = Term::create([ | |
65 'name' => $this->randomMachineName(), | |
66 'description' => $this->randomMachineName(), | |
67 'vid' => $this->vocabulary->id(), | |
68 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, | |
69 ]); | |
70 $term->save(); | |
71 | |
72 $this->term = $term; | |
73 | |
74 // Create an image field. | |
75 FieldStorageConfig::create([ | |
76 'field_name' => 'field_image', | |
77 'entity_type' => 'node', | |
78 'type' => 'image', | |
79 'settings' => [], | |
80 'cardinality' => FieldStorageConfig::CARDINALITY_UNLIMITED, | |
81 ])->save(); | |
82 | |
83 $field_config = FieldConfig::create([ | |
84 'field_name' => 'field_image', | |
85 'label' => 'Images', | |
86 'entity_type' => 'node', | |
87 'bundle' => 'page', | |
88 'required' => FALSE, | |
89 'settings' => [], | |
90 ]); | |
91 $field_config->save(); | |
92 | |
93 // Create a field. | |
94 $this->fieldName = mb_strtolower($this->randomMachineName()); | |
95 $handler_settings = [ | |
96 'target_bundles' => [ | |
97 $this->vocabulary->id() => $this->vocabulary->id(), | |
98 ], | |
99 'auto_create' => TRUE, | |
100 ]; | |
101 $this->createEntityReferenceField('node', 'page', $this->fieldName, 'Tags', 'taxonomy_term', 'default', $handler_settings, FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); | |
102 | |
103 entity_get_form_display('node', 'page', 'default') | |
104 ->setComponent($this->fieldName, [ | |
105 'type' => 'entity_reference_autocomplete_tags', | |
106 ]) | |
107 ->save(); | |
108 | |
109 // Show on default display and teaser. | |
110 entity_get_display('node', 'page', 'default') | |
111 ->setComponent($this->fieldName, [ | |
112 'type' => 'entity_reference_label', | |
113 ]) | |
114 ->save(); | |
115 entity_get_display('node', 'page', 'teaser') | |
116 ->setComponent($this->fieldName, [ | |
117 'type' => 'entity_reference_label', | |
118 ]) | |
119 ->save(); | |
120 | |
121 entity_get_form_display('node', 'page', 'default') | |
122 ->setComponent('field_image', [ | |
123 'type' => 'image_image', | |
124 'settings' => [], | |
125 ]) | |
126 ->save(); | |
127 | |
128 entity_get_display('node', 'page', 'default') | |
129 ->setComponent('field_image') | |
130 ->save(); | |
131 | |
132 // Create a multi-value text field. | |
133 $field_storage = FieldStorageConfig::create([ | |
134 'field_name' => 'field_test_multi', | |
135 'entity_type' => 'node', | |
136 'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED, | |
137 'type' => 'text', | |
138 'settings' => [ | |
139 'max_length' => 50, | |
140 ], | |
141 ]); | |
142 $field_storage->save(); | |
143 FieldConfig::create([ | |
144 'field_storage' => $field_storage, | |
145 'bundle' => 'page', | |
146 ])->save(); | |
147 | |
148 entity_get_form_display('node', 'page', 'default') | |
149 ->setComponent('field_test_multi', [ | |
150 'type' => 'text_textfield', | |
151 ]) | |
152 ->save(); | |
153 | |
154 entity_get_display('node', 'page', 'default') | |
155 ->setComponent('field_test_multi', [ | |
156 'type' => 'string', | |
157 ]) | |
158 ->save(); | |
159 } | |
160 | |
161 /** | |
162 * Checks the node preview functionality. | |
163 */ | |
164 public function testPagePreview() { | |
165 $title_key = 'title[0][value]'; | |
166 $body_key = 'body[0][value]'; | |
167 $term_key = $this->fieldName . '[target_id]'; | |
168 | |
169 // Fill in node creation form and preview node. | |
170 $edit = []; | |
171 $edit[$title_key] = '<em>' . $this->randomMachineName(8) . '</em>'; | |
172 $edit[$body_key] = $this->randomMachineName(16); | |
173 $edit[$term_key] = $this->term->getName(); | |
174 | |
175 // Upload an image. | |
176 $test_image = current($this->drupalGetTestFiles('image', 39325)); | |
177 $edit['files[field_image_0][]'] = \Drupal::service('file_system')->realpath($test_image->uri); | |
178 $this->drupalPostForm('node/add/page', $edit, t('Upload')); | |
179 | |
180 // Add an alt tag and preview the node. | |
181 $this->drupalPostForm(NULL, ['field_image[0][alt]' => 'Picture of llamas'], t('Preview')); | |
182 | |
183 // Check that the preview is displaying the title, body and term. | |
184 $expected_title = $edit[$title_key] . ' | Drupal'; | |
185 $this->assertSession()->titleEquals($expected_title); | |
186 $this->assertEscaped($edit[$title_key], 'Title displayed and escaped.'); | |
187 $this->assertText($edit[$body_key], 'Body displayed.'); | |
188 $this->assertText($edit[$term_key], 'Term displayed.'); | |
189 $this->assertLink(t('Back to content editing')); | |
190 | |
191 // Check that we see the class of the node type on the body element. | |
192 $body_class_element = $this->xpath("//body[contains(@class, 'page-node-type-page')]"); | |
193 $this->assertTrue(!empty($body_class_element), 'Node type body class found.'); | |
194 | |
195 // Get the UUID. | |
196 $url = parse_url($this->getUrl()); | |
197 $paths = explode('/', $url['path']); | |
198 $view_mode = array_pop($paths); | |
199 $uuid = array_pop($paths); | |
200 | |
201 // Switch view mode. We'll remove the body from the teaser view mode. | |
202 entity_get_display('node', 'page', 'teaser') | |
203 ->removeComponent('body') | |
204 ->save(); | |
205 | |
206 $view_mode_edit = ['view_mode' => 'teaser']; | |
207 $this->drupalPostForm('node/preview/' . $uuid . '/full', $view_mode_edit, t('Switch')); | |
208 $this->assertRaw('view-mode-teaser', 'View mode teaser class found.'); | |
209 $this->assertNoText($edit[$body_key], 'Body not displayed.'); | |
210 | |
211 // Check that the title, body and term fields are displayed with the | |
212 // values after going back to the content edit page. | |
213 $this->clickLink(t('Back to content editing')); | |
214 $this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.'); | |
215 $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.'); | |
216 $this->assertFieldByName($term_key, $edit[$term_key], 'Term field displayed.'); | |
217 $this->assertFieldByName('field_image[0][alt]', 'Picture of llamas'); | |
218 $this->getSession()->getPage()->pressButton('Add another item'); | |
219 $this->assertFieldByName('field_test_multi[0][value]'); | |
220 $this->assertFieldByName('field_test_multi[1][value]'); | |
221 | |
222 // Return to page preview to check everything is as expected. | |
223 $this->drupalPostForm(NULL, [], t('Preview')); | |
224 $this->assertSession()->titleEquals($expected_title); | |
225 $this->assertEscaped($edit[$title_key], 'Title displayed and escaped.'); | |
226 $this->assertText($edit[$body_key], 'Body displayed.'); | |
227 $this->assertText($edit[$term_key], 'Term displayed.'); | |
228 $this->assertLink(t('Back to content editing')); | |
229 | |
230 // Assert the content is kept when reloading the page. | |
231 $this->drupalGet('node/add/page', ['query' => ['uuid' => $uuid]]); | |
232 $this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.'); | |
233 $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.'); | |
234 $this->assertFieldByName($term_key, $edit[$term_key], 'Term field displayed.'); | |
235 | |
236 // Save the node - this is a new POST, so we need to upload the image. | |
237 $this->drupalPostForm('node/add/page', $edit, t('Upload')); | |
238 $this->drupalPostForm(NULL, ['field_image[0][alt]' => 'Picture of llamas'], t('Save')); | |
239 $node = $this->drupalGetNodeByTitle($edit[$title_key]); | |
240 | |
241 // Check the term was displayed on the saved node. | |
242 $this->drupalGet('node/' . $node->id()); | |
243 $this->assertText($edit[$term_key], 'Term displayed.'); | |
244 | |
245 // Check the term appears again on the edit form. | |
246 $this->drupalGet('node/' . $node->id() . '/edit'); | |
247 $this->assertFieldByName($term_key, $edit[$term_key] . ' (' . $this->term->id() . ')', 'Term field displayed.'); | |
248 | |
249 // Check with two new terms on the edit form, additionally to the existing | |
250 // one. | |
251 $edit = []; | |
252 $newterm1 = $this->randomMachineName(8); | |
253 $newterm2 = $this->randomMachineName(8); | |
254 $edit[$term_key] = $this->term->getName() . ', ' . $newterm1 . ', ' . $newterm2; | |
255 $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Preview')); | |
256 $this->assertRaw('>' . $newterm1 . '<', 'First new term displayed.'); | |
257 $this->assertRaw('>' . $newterm2 . '<', 'Second new term displayed.'); | |
258 // The first term should be displayed as link, the others not. | |
259 $this->assertLink($this->term->getName()); | |
260 $this->assertNoLink($newterm1); | |
261 $this->assertNoLink($newterm2); | |
262 | |
263 $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save')); | |
264 | |
265 // Check with one more new term, keeping old terms, removing the existing | |
266 // one. | |
267 $edit = []; | |
268 $newterm3 = $this->randomMachineName(8); | |
269 $edit[$term_key] = $newterm1 . ', ' . $newterm3 . ', ' . $newterm2; | |
270 $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Preview')); | |
271 $this->assertRaw('>' . $newterm1 . '<', 'First existing term displayed.'); | |
272 $this->assertRaw('>' . $newterm2 . '<', 'Second existing term displayed.'); | |
273 $this->assertRaw('>' . $newterm3 . '<', 'Third new term displayed.'); | |
274 $this->assertNoText($this->term->getName()); | |
275 $this->assertLink($newterm1); | |
276 $this->assertLink($newterm2); | |
277 $this->assertNoLink($newterm3); | |
278 | |
279 // Check that editing an existing node after it has been previewed and not | |
280 // saved doesn't remember the previous changes. | |
281 $edit = [ | |
282 $title_key => $this->randomMachineName(8), | |
283 ]; | |
284 $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Preview')); | |
285 $this->assertText($edit[$title_key], 'New title displayed.'); | |
286 $this->clickLink(t('Back to content editing')); | |
287 $this->assertFieldByName($title_key, $edit[$title_key], 'New title value displayed.'); | |
288 // Navigate away from the node without saving. | |
289 $this->drupalGet('<front>'); | |
290 // Go back to the edit form, the title should have its initial value. | |
291 $this->drupalGet('node/' . $node->id() . '/edit'); | |
292 $this->assertFieldByName($title_key, $node->label(), 'Correct title value displayed.'); | |
293 | |
294 // Check with required preview. | |
295 $node_type = NodeType::load('page'); | |
296 $node_type->setPreviewMode(DRUPAL_REQUIRED); | |
297 $node_type->save(); | |
298 $this->drupalGet('node/add/page'); | |
299 $this->assertNoRaw('edit-submit'); | |
300 $this->drupalPostForm('node/add/page', [$title_key => 'Preview'], t('Preview')); | |
301 $this->clickLink(t('Back to content editing')); | |
302 $this->assertRaw('edit-submit'); | |
303 | |
304 // Check that destination is remembered when clicking on preview. When going | |
305 // back to the edit form and clicking save, we should go back to the | |
306 // original destination, if set. | |
307 $destination = 'node'; | |
308 $this->drupalPostForm($node->toUrl('edit-form'), [], t('Preview'), ['query' => ['destination' => $destination]]); | |
309 $parameters = ['node_preview' => $node->uuid(), 'view_mode_id' => 'full']; | |
310 $options = ['absolute' => TRUE, 'query' => ['destination' => $destination]]; | |
311 $this->assertUrl(Url::fromRoute('entity.node.preview', $parameters, $options)); | |
312 $this->drupalPostForm(NULL, ['view_mode' => 'teaser'], t('Switch')); | |
313 $this->clickLink(t('Back to content editing')); | |
314 $this->drupalPostForm(NULL, [], t('Save')); | |
315 $this->assertUrl($destination); | |
316 | |
317 // Check that preview page works as expected without a destination set. | |
318 $this->drupalPostForm($node->toUrl('edit-form'), [], t('Preview')); | |
319 $parameters = ['node_preview' => $node->uuid(), 'view_mode_id' => 'full']; | |
320 $this->assertUrl(Url::fromRoute('entity.node.preview', $parameters, ['absolute' => TRUE])); | |
321 $this->drupalPostForm(NULL, ['view_mode' => 'teaser'], t('Switch')); | |
322 $this->clickLink(t('Back to content editing')); | |
323 $this->drupalPostForm(NULL, [], t('Save')); | |
324 $this->assertUrl($node->toUrl()); | |
325 $this->assertResponse(200); | |
326 | |
327 /** @var \Drupal\Core\File\FileSystemInterface $file_system */ | |
328 $file_system = \Drupal::service('file_system'); | |
329 // Assert multiple items can be added and are not lost when previewing. | |
330 $test_image_1 = current($this->drupalGetTestFiles('image', 39325)); | |
331 $edit_image_1['files[field_image_0][]'] = $file_system->realpath($test_image_1->uri); | |
332 $test_image_2 = current($this->drupalGetTestFiles('image', 39325)); | |
333 $edit_image_2['files[field_image_1][]'] = $file_system->realpath($test_image_2->uri); | |
334 $edit['field_image[0][alt]'] = 'Alt 1'; | |
335 | |
336 $this->drupalPostForm('node/add/page', $edit_image_1, t('Upload')); | |
337 $this->drupalPostForm(NULL, $edit, t('Preview')); | |
338 $this->clickLink(t('Back to content editing')); | |
339 $this->assertFieldByName('files[field_image_1][]'); | |
340 $this->drupalPostForm(NULL, $edit_image_2, t('Upload')); | |
341 $this->assertNoFieldByName('files[field_image_1][]'); | |
342 | |
343 $title = 'node_test_title'; | |
344 $example_text_1 = 'example_text_preview_1'; | |
345 $example_text_2 = 'example_text_preview_2'; | |
346 $example_text_3 = 'example_text_preview_3'; | |
347 $this->drupalGet('node/add/page'); | |
348 $edit = [ | |
349 'title[0][value]' => $title, | |
350 'field_test_multi[0][value]' => $example_text_1, | |
351 ]; | |
352 $this->assertRaw('Storage is not set'); | |
353 $this->drupalPostForm(NULL, $edit, t('Preview')); | |
354 $this->clickLink(t('Back to content editing')); | |
355 $this->assertRaw('Storage is set'); | |
356 $this->assertFieldByName('field_test_multi[0][value]'); | |
357 $this->drupalPostForm(NULL, [], t('Save')); | |
358 $this->assertText('Basic page ' . $title . ' has been created.'); | |
359 $node = $this->drupalGetNodeByTitle($title); | |
360 $this->drupalGet('node/' . $node->id() . '/edit'); | |
361 $this->getSession()->getPage()->pressButton('Add another item'); | |
362 $this->getSession()->getPage()->pressButton('Add another item'); | |
363 $edit = [ | |
364 'field_test_multi[1][value]' => $example_text_2, | |
365 'field_test_multi[2][value]' => $example_text_3, | |
366 ]; | |
367 $this->drupalPostForm(NULL, $edit, t('Preview')); | |
368 $this->clickLink(t('Back to content editing')); | |
369 $this->drupalPostForm(NULL, $edit, t('Preview')); | |
370 $this->clickLink(t('Back to content editing')); | |
371 $this->assertFieldByName('field_test_multi[0][value]', $example_text_1); | |
372 $this->assertFieldByName('field_test_multi[1][value]', $example_text_2); | |
373 $this->assertFieldByName('field_test_multi[2][value]', $example_text_3); | |
374 | |
375 // Now save the node and make sure all values got saved. | |
376 $this->drupalPostForm(NULL, [], t('Save')); | |
377 $this->assertText($example_text_1); | |
378 $this->assertText($example_text_2); | |
379 $this->assertText($example_text_3); | |
380 | |
381 // Edit again, change the menu_ui settings and click on preview. | |
382 $this->drupalGet('node/' . $node->id() . '/edit'); | |
383 $edit = [ | |
384 'menu[enabled]' => TRUE, | |
385 'menu[title]' => 'Changed title', | |
386 ]; | |
387 $this->drupalPostForm(NULL, $edit, t('Preview')); | |
388 $this->clickLink(t('Back to content editing')); | |
389 $this->assertFieldChecked('edit-menu-enabled', 'Menu option is still checked'); | |
390 $this->assertFieldByName('menu[title]', 'Changed title', 'Menu link title is correct after preview'); | |
391 | |
392 // Save, change the title while saving and make sure that it is correctly | |
393 // saved. | |
394 $edit = [ | |
395 'menu[enabled]' => TRUE, | |
396 'menu[title]' => 'Second title change', | |
397 ]; | |
398 $this->drupalPostForm(NULL, $edit, t('Save')); | |
399 $this->drupalGet('node/' . $node->id() . '/edit'); | |
400 $this->assertFieldByName('menu[title]', 'Second title change', 'Menu link title is correct after saving'); | |
401 | |
402 } | |
403 | |
404 /** | |
405 * Checks the node preview functionality, when using revisions. | |
406 */ | |
407 public function testPagePreviewWithRevisions() { | |
408 $title_key = 'title[0][value]'; | |
409 $body_key = 'body[0][value]'; | |
410 $term_key = $this->fieldName . '[target_id]'; | |
411 // Force revision on "Basic page" content. | |
412 $node_type = NodeType::load('page'); | |
413 $node_type->setNewRevision(TRUE); | |
414 $node_type->save(); | |
415 | |
416 // Fill in node creation form and preview node. | |
417 $edit = []; | |
418 $edit[$title_key] = $this->randomMachineName(8); | |
419 $edit[$body_key] = $this->randomMachineName(16); | |
420 $edit[$term_key] = $this->term->id(); | |
421 $edit['revision_log[0][value]'] = $this->randomString(32); | |
422 $this->drupalPostForm('node/add/page', $edit, t('Preview')); | |
423 | |
424 // Check that the preview is displaying the title, body and term. | |
425 $this->assertTitle(t('@title | Drupal', ['@title' => $edit[$title_key]]), 'Basic page title is preview.'); | |
426 $this->assertText($edit[$title_key], 'Title displayed.'); | |
427 $this->assertText($edit[$body_key], 'Body displayed.'); | |
428 $this->assertText($edit[$term_key], 'Term displayed.'); | |
429 | |
430 // Check that the title and body fields are displayed with the correct | |
431 // values after going back to the content edit page. | |
432 $this->clickLink(t('Back to content editing')); $this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.'); | |
433 $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.'); | |
434 $this->assertFieldByName($term_key, $edit[$term_key], 'Term field displayed.'); | |
435 | |
436 // Check that the revision log field has the correct value. | |
437 $this->assertFieldByName('revision_log[0][value]', $edit['revision_log[0][value]'], 'Revision log field displayed.'); | |
438 | |
439 // Save the node after coming back from the preview page so we can create a | |
440 // pending revision for it. | |
441 $this->drupalPostForm(NULL, [], t('Save')); | |
442 $node = $this->drupalGetNodeByTitle($edit[$title_key]); | |
443 | |
444 // Check that previewing a pending revision of a node works. This can not be | |
445 // accomplished through the UI so we have to use API calls. | |
446 // @todo Change this test to use the UI when we will be able to create | |
447 // pending revisions in core. | |
448 // @see https://www.drupal.org/node/2725533 | |
449 $node->setNewRevision(TRUE); | |
450 $node->isDefaultRevision(FALSE); | |
451 | |
452 /** @var \Drupal\Core\Controller\ControllerResolverInterface $controller_resolver */ | |
453 $controller_resolver = \Drupal::service('controller_resolver'); | |
454 $node_preview_controller = $controller_resolver->getControllerFromDefinition('\Drupal\node\Controller\NodePreviewController::view'); | |
455 $node_preview_controller($node, 'full'); | |
456 } | |
457 | |
458 /** | |
459 * Checks the node preview accessible for simultaneous node editing. | |
460 */ | |
461 public function testSimultaneousPreview() { | |
462 $title_key = 'title[0][value]'; | |
463 $node = $this->drupalCreateNode([]); | |
464 | |
465 $edit = [$title_key => 'New page title']; | |
466 $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Preview')); | |
467 $this->assertText($edit[$title_key]); | |
468 | |
469 $user2 = $this->drupalCreateUser(['edit any page content']); | |
470 $this->drupalLogin($user2); | |
471 $this->drupalGet('node/' . $node->id() . '/edit'); | |
472 $this->assertFieldByName($title_key, $node->label(), 'No title leaked from previous user.'); | |
473 | |
474 $edit2 = [$title_key => 'Another page title']; | |
475 $this->drupalPostForm('node/' . $node->id() . '/edit', $edit2, t('Preview')); | |
476 $this->assertUrl(\Drupal::url('entity.node.preview', ['node_preview' => $node->uuid(), 'view_mode_id' => 'full'], ['absolute' => TRUE])); | |
477 $this->assertText($edit2[$title_key]); | |
478 } | |
479 | |
480 } |