Mercurial > hg > isophonics-drupal-site
comparison core/modules/link/tests/src/Functional/LinkFieldTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | c2387f117808 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
22 /** | 22 /** |
23 * Modules to enable. | 23 * Modules to enable. |
24 * | 24 * |
25 * @var array | 25 * @var array |
26 */ | 26 */ |
27 public static $modules = ['entity_test', 'link', 'node']; | 27 public static $modules = [ |
28 'entity_test', | |
29 'link', | |
30 'node', | |
31 'link_test_base_field', | |
32 ]; | |
28 | 33 |
29 /** | 34 /** |
30 * A field to use in this test class. | 35 * A field to use in this test class. |
31 * | 36 * |
32 * @var \Drupal\field\Entity\FieldStorageConfig | 37 * @var \Drupal\field\Entity\FieldStorageConfig |
280 // Verify that the link text is required, if the URL is non-empty. | 285 // Verify that the link text is required, if the URL is non-empty. |
281 $edit = [ | 286 $edit = [ |
282 "{$field_name}[0][uri]" => 'http://www.example.com', | 287 "{$field_name}[0][uri]" => 'http://www.example.com', |
283 ]; | 288 ]; |
284 $this->drupalPostForm(NULL, $edit, t('Save')); | 289 $this->drupalPostForm(NULL, $edit, t('Save')); |
285 $this->assertText(t('@name field is required.', ['@name' => t('Link text')])); | 290 $this->assertText(t('@title field is required if there is @uri input.', ['@title' => t('Link text'), '@uri' => t('URL')])); |
286 | 291 |
287 // Verify that the link text is not required, if the URL is empty. | 292 // Verify that the link text is not required, if the URL is empty. |
288 $edit = [ | 293 $edit = [ |
289 "{$field_name}[0][uri]" => '', | 294 "{$field_name}[0][uri]" => '', |
290 ]; | 295 ]; |