Skip to content

Commit f14a28c

Browse files
authored
Merge pull request #6615 from magento-lynx/MC-39923
MC-39923 Stabilize Integration Tests (PageBuilder)
2 parents 90bacac + 01198bc commit f14a28c

File tree

9 files changed

+14
-12
lines changed

9 files changed

+14
-12
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Gallery/UploadTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function testUploadActionWithErrors(array $file, array $expectation): voi
167167
$this->assertEquals($expectation['errorcode'], $jsonBody['errorcode']);
168168

169169
if (!empty($expectation['tmp_media_path'])) {
170-
$this->assertFileNotExists(
170+
$this->assertFileDoesNotExist(
171171
$this->getFileAbsolutePath($expectation['tmp_media_path'])
172172
);
173173
}

dev/tests/integration/testsuite/Magento/Catalog/Model/ImageUploaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function testMoveFileFromTmp(): void
9090
{
9191
$expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';
9292

93-
$this->assertFileNotExists($this->mediaDirectory->getAbsolutePath($expectedFilePath));
93+
$this->assertFileDoesNotExist($this->mediaDirectory->getAbsolutePath($expectedFilePath));
9494

9595
$this->imageUploader->moveFileFromTmp('magento_small_image.jpg');
9696

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery/UpdateHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public function testExecuteWithImageToDelete(): void
289289
$this->updateHandler->execute($product);
290290
$productImages = $this->galleryResource->loadProductGalleryByAttributeId($product, $this->mediaAttributeId);
291291
$this->assertCount(0, $productImages);
292-
$this->assertFileNotExists(
292+
$this->assertFileDoesNotExist(
293293
$this->mediaDirectory->getAbsolutePath($this->config->getBaseMediaPath() . $image)
294294
);
295295
$defaultImages = $this->productResource->getAttributeRawValue(

dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/NewFolderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function testExecuteWithWrongPath()
111111
$this->model->getStorage()->getSession()->setCurrentPath($this->fullDirectoryPath . $dirPath);
112112
$this->model->execute();
113113

114-
$this->assertFileNotExists(
114+
$this->assertFileDoesNotExist(
115115
$this->fullDirectoryPath . $dirPath . $this->dirName
116116
);
117117
}

dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/UploadTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function testExecuteWithWrongPath()
182182
$this->model->getStorage()->getSession()->setCurrentPath($dirPath);
183183
$this->model->execute();
184184

185-
$this->assertFileNotExists(
185+
$this->assertFileDoesNotExist(
186186
$this->fullDirectoryPath . $dirPath . $this->fileName
187187
);
188188
}
@@ -202,7 +202,7 @@ public function testExecuteWithWrongFileName()
202202
$this->model->getStorage()->getSession()->setCurrentPath($this->fullDirectoryPath);
203203
$this->model->execute();
204204

205-
$this->assertFileNotExists($this->fullDirectoryPath . $newFilename);
205+
$this->assertFileDoesNotExist($this->fullDirectoryPath . $newFilename);
206206
}
207207

208208
/**

dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function testDeleteDirectory(): void
121121
$this->storage->createDirectory($dir, $path);
122122
$this->assertFileExists($fullPath);
123123
$this->storage->deleteDirectory($fullPath);
124-
$this->assertFileNotExists($fullPath);
124+
$this->assertFileDoesNotExist($fullPath);
125125
}
126126

127127
/**
@@ -167,7 +167,9 @@ public function testUploadFile(): void
167167
*/
168168
public function testUploadFileWithExcludedDirPath(): void
169169
{
170-
$this->expectExceptionMessage("We can't upload the file to current folder right now. Please try another folder.");
170+
$this->expectExceptionMessage(
171+
"We can't upload the file to current folder right now. Please try another folder."
172+
);
171173
$this->expectException(\Magento\Framework\Exception\LocalizedException::class);
172174
$fileName = 'magento_small_image.jpg';
173175
$tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP);

dev/tests/integration/testsuite/Magento/Framework/MessageQueue/UseCase/WildcardTopicTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ public function testWildCardNonMatchingTopic()
6363
$testObject = $this->generateTestObject();
6464
$this->publisher->publish('not.matching.wildcard.topic', $testObject);
6565
sleep(2);
66-
$this->assertFileNotExists($this->logFilePath, "No log file must be created for non-matching topic.");
66+
$this->assertFileDoesNotExist($this->logFilePath, "No log file must be created for non-matching topic.");
6767
}
6868

6969
/**
7070
* @return AsyncTestData
7171
*/
7272
private function generateTestObject()
7373
{
74-
$testObject = $this->objectManager->create(AsyncTestData::class);
74+
$testObject = $this->objectManager->create(AsyncTestData::class); // @phpstan-ignore-line
7575
$testObject->setValue('||Message Contents||');
7676
$testObject->setTextFilePath($this->logFilePath);
7777
return $testObject;

dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Adapter/CsvTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function testDestruct(): void
6262
);
6363
/** Assert that the destination file was removed after destruct */
6464
$this->csv = null;
65-
$this->assertFileNotExists(
65+
$this->assertFileDoesNotExist(
6666
$directoryHandle->getAbsolutePath($this->destination),
6767
'The destination file was\'t removed after destruct'
6868
);

dev/tests/integration/testsuite/Magento/Setup/Module/I18n/Pack/GeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function tearDown(): void
8686

8787
public function testGeneration()
8888
{
89-
$this->assertFileNotExists($this->_packPath);
89+
$this->assertFileDoesNotExist($this->_packPath);
9090

9191
ComponentRegistrar::register(
9292
ComponentRegistrar::MODULE,

0 commit comments

Comments
 (0)