|
@@ -99,10 +99,10 @@ discard block |
|
|
block discarded – undo |
|
99
|
99
|
$this->assertRaw($edit['description']); |
|
100
|
100
|
|
|
101
|
101
|
// See if crop type appears on image effect configuration form. |
|
102
|
|
- $this->drupalGet('admin/config/media/image-styles/manage/' . $this->testStyle->id() . '/add/crop_crop'); |
|
|
102
|
+ $this->drupalGet('admin/config/media/image-styles/manage/'.$this->testStyle->id().'/add/crop_crop'); |
|
103
|
103
|
$option = $this->xpath("//select[@id='edit-data-crop-type']/option"); |
|
104
|
104
|
$this->assert(strpos($option[0]->asXML(), $edit['label']) !== FALSE, 'Crop type label found on image effect page.'); |
|
105
|
|
- $this->drupalPostForm('admin/config/media/image-styles/manage/' . $this->testStyle->id() . '/add/crop_crop', ['data[crop_type]' => $edit['id']], t('Add effect')); |
|
|
105
|
+ $this->drupalPostForm('admin/config/media/image-styles/manage/'.$this->testStyle->id().'/add/crop_crop', ['data[crop_type]' => $edit['id']], t('Add effect')); |
|
106
|
106
|
$this->assertText(t('The image effect was successfully applied.')); |
|
107
|
107
|
$this->assertText(t('Manual crop uses @name crop type', ['@name' => $edit['label']])); |
|
108
|
108
|
$this->testStyle = $this->container->get('entity.manager')->getStorage('image_style')->loadUnchanged($this->testStyle->id()); |
|
@@ -112,7 +112,7 @@ discard block |
|
|
block discarded – undo |
|
112
|
112
|
|
|
113
|
113
|
// Try to access edit form as anonymous user. |
|
114
|
114
|
$this->drupalLogout(); |
|
115
|
|
- $this->drupalGet('admin/structure/crop/manage/' . $edit['id']); |
|
|
115
|
+ $this->drupalGet('admin/structure/crop/manage/'.$edit['id']); |
|
116
|
116
|
$this->assertResponse(403); |
|
117
|
117
|
$this->drupalLogin($this->adminUser); |
|
118
|
118
|
|
|
@@ -125,7 +125,7 @@ discard block |
|
|
block discarded – undo |
|
125
|
125
|
$this->assertLink('Test image style'); |
|
126
|
126
|
$this->clickLink(t('Delete')); |
|
127
|
127
|
$this->assertText(t('Are you sure you want to delete the crop type @name?', ['@name' => $edit['label']])); |
|
128
|
|
- $this->drupalPostForm('admin/structure/crop/manage/' . $edit['id'] . '/delete', [], t('Delete')); |
|
|
128
|
+ $this->drupalPostForm('admin/structure/crop/manage/'.$edit['id'].'/delete', [], t('Delete')); |
|
129
|
129
|
$this->assertRaw(t('The crop type %name has been deleted.', ['%name' => $edit['label']])); |
|
130
|
130
|
$this->assertText(t('No crop types available.')); |
|
131
|
131
|
} |