comparison core/modules/image/src/Tests/ImageAdminStylesTest.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
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
420 $this->drupalPostForm(NULL, ['data[width]' => '12', 'data[height]' => '19'], t('Add effect')); 420 $this->drupalPostForm(NULL, ['data[width]' => '12', 'data[height]' => '19'], t('Add effect'));
421 421
422 // Edit the scale effect that was just added. 422 // Edit the scale effect that was just added.
423 $this->clickLink(t('Edit')); 423 $this->clickLink(t('Edit'));
424 $this->drupalPostForm(NULL, ['data[width]' => '24', 'data[height]' => '19'], t('Update effect')); 424 $this->drupalPostForm(NULL, ['data[width]' => '24', 'data[height]' => '19'], t('Update effect'));
425
426 // Add another scale effect and make sure both exist. Click through from
427 // the overview to make sure that it is possible to add new effect then.
428 $this->drupalGet('admin/config/media/image-styles');
429 $rows = $this->xpath('//table/tbody/tr');
430 $i = 0;
431 foreach ($rows as $row) {
432 if (((string) $row->td[0]) === 'Test style scale edit scale') {
433 $this->clickLink('Edit', $i);
434 break;
435 }
436 $i++;
437 }
425 $this->drupalPostForm(NULL, ['new' => 'image_scale'], t('Add')); 438 $this->drupalPostForm(NULL, ['new' => 'image_scale'], t('Add'));
426
427 // Add another scale effect and make sure both exist.
428 $this->drupalPostForm(NULL, ['data[width]' => '12', 'data[height]' => '19'], t('Add effect')); 439 $this->drupalPostForm(NULL, ['data[width]' => '12', 'data[height]' => '19'], t('Add effect'));
429 $this->assertText(t('Scale 24×19')); 440 $this->assertText(t('Scale 24×19'));
430 $this->assertText(t('Scale 12×19')); 441 $this->assertText(t('Scale 12×19'));
431 442
432 // Try to edit a nonexistent effect. 443 // Try to edit a nonexistent effect.