@@ -114,7 +114,7 @@ public static function tearDownAfterClass(): void
114
114
public function testExecute (string $ path , string $ renditionPath ): void
115
115
{
116
116
$ this ->copyImage ($ path );
117
- $ this ->generateRenditions ->execute ([self ::TEST_DIR . $ path ]);
117
+ $ this ->generateRenditions ->execute ([self ::TEST_DIR . DIRECTORY_SEPARATOR . $ path ]);
118
118
list ($ imageWidth , $ imageHeight ) = getimagesizefromstring ($ this ->mediaDirectory ->readFile ($ renditionPath ));
119
119
$ this ->assertTrue ($ this ->mediaDirectory ->isExist ($ renditionPath ));
120
120
$ this ->assertLessThanOrEqual (
@@ -130,13 +130,15 @@ public function testExecute(string $path, string $renditionPath): void
130
130
}
131
131
132
132
/**
133
- * @param array $paths
133
+ * Copies file from the integration test directory to the media directory
134
+ *
135
+ * @param string $path
134
136
* @throws FileSystemException
135
137
*/
136
138
private function copyImage (string $ path ): void
137
139
{
138
140
$ imagePath = realpath (__DIR__ . '/../../_files/ ' . $ path );
139
- $ modifiableFilePath = $ this ->mediaDirectory ->getAbsolutePath (self ::TEST_DIR . $ path );
141
+ $ modifiableFilePath = $ this ->mediaDirectory ->getAbsolutePath (self ::TEST_DIR . DIRECTORY_SEPARATOR . $ path );
140
142
$ this ->driver ->filePutContents (
141
143
$ modifiableFilePath ,
142
144
file_get_contents ($ imagePath )
@@ -150,11 +152,11 @@ public function renditionsImageProvider(): array
150
152
{
151
153
return [
152
154
'rendition_image_not_generated ' => [
153
- 'paths ' => '/ magento_medium_image.jpg ' ,
155
+ 'path ' => 'magento_medium_image.jpg ' ,
154
156
'renditionPath ' => ".renditions/ " . self ::TEST_DIR . "/magento_medium_image.jpg "
155
157
],
156
158
'rendition_image_generated ' => [
157
- 'paths ' => '/ magento_large_image.jpg ' ,
159
+ 'path ' => 'magento_large_image.jpg ' ,
158
160
'renditionPath ' => ".renditions/ " . self ::TEST_DIR . "/magento_large_image.jpg "
159
161
]
160
162
];
0 commit comments