Skip to content

Commit 3765244

Browse files
committed
MC-42170: Fixed static tests
1 parent 8d161aa commit 3765244

File tree

10 files changed

+19
-15
lines changed

10 files changed

+19
-15
lines changed

app/etc/vendor_path.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
26
/**
37
* Path to Composer vendor directory
48
*/

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
@@ -113,7 +113,7 @@ public function testExecuteWithWrongPath()
113113
$this->model->getStorage()->getSession()->setCurrentPath($this->fullDirectoryPath . $dirPath);
114114
$this->model->execute();
115115

116-
$this->assertFileNotExists(
116+
$this->assertFileDoesNotExist(
117117
$this->fullDirectoryPath . $dirPath . $this->dirName
118118
);
119119
}

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
@@ -184,7 +184,7 @@ public function testExecuteWithWrongPath()
184184
$this->model->getStorage()->getSession()->setCurrentPath($dirPath);
185185
$this->model->execute();
186186

187-
$this->assertFileNotExists(
187+
$this->assertFileDoesNotExist(
188188
$this->fullDirectoryPath . $dirPath . $this->fileName
189189
);
190190
}
@@ -204,7 +204,7 @@ public function testExecuteWithWrongFileName()
204204
$this->model->getStorage()->getSession()->setCurrentPath($this->fullDirectoryPath);
205205
$this->model->execute();
206206

207-
$this->assertFileNotExists($this->fullDirectoryPath . $newFilename);
207+
$this->assertFileDoesNotExist($this->fullDirectoryPath . $newFilename);
208208
}
209209

210210
/**

dev/tests/integration/testsuite/Magento/Developer/Model/Logger/Handler/DebugTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function testDebugInProductionMode()
127127

128128
$this->removeDebugLog();
129129
$this->logger->debug($message);
130-
$this->assertFileNotExists($this->getDebuggerLogPath());
130+
$this->assertFileDoesNotExist($this->getDebuggerLogPath());
131131
$this->assertNull($this->deploymentConfig->get(ConfigOptionsList::CONFIG_PATH_DEBUG_LOGGING));
132132

133133
$this->checkCommonFlow($message);
@@ -237,6 +237,6 @@ private function checkCommonFlow(string $message)
237237
$this->enableDebugging(false);
238238
$this->removeDebugLog();
239239
$this->logger->debug($message);
240-
$this->assertFileNotExists($this->getDebuggerLogPath());
240+
$this->assertFileDoesNotExist($this->getDebuggerLogPath());
241241
}
242242
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ 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
/**

dev/tests/integration/testsuite/Magento/MediaGallery/Model/Directory/Command/DeleteByPathsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testDeleteDirectory(): void
5454
$fullPath = $mediaDirectory->getAbsolutePath($this->testDirectoryName);
5555
$this->assertFileExists($fullPath);
5656
$this->deleteByPaths->execute([$this->testDirectoryName]);
57-
$this->assertFileNotExists($fullPath);
57+
$this->assertFileDoesNotExist($fullPath);
5858
}
5959

6060
/**

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,

dev/tests/static/testsuite/Magento/Test/Legacy/FilesystemTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function testRelocations()
2222
* @param string $path
2323
*/
2424
function ($path) {
25-
$this->assertFileNotExists(
25+
$this->assertFileDoesNotExist(
2626
BP . '/' . $path
2727
);
2828
},

dev/tests/static/testsuite/Magento/Test/Legacy/LibraryLocationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static function setUpBeforeClass(): void
2626
public function testOldWebLibrariesLocation()
2727
{
2828
$oldLocation = self::$root . '/pub/lib';
29-
$this->assertFileNotExists($oldLocation, "The web libraries have been moved from 'pub/lib' to 'lib/web'");
29+
$this->assertFileDoesNotExist($oldLocation, "The web libraries have been moved from 'pub/lib' to 'lib/web'");
3030
}
3131

3232
public function testOldPhpLibrariesLocation()

dev/tests/static/testsuite/Magento/Test/Legacy/PhtmlTemplateTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testBlockVariableInsteadOfThis()
2424
* @param string $file
2525
*/
2626
function ($file) {
27-
self::assertNotRegExp(
27+
self::assertDoesNotMatchRegularExpression(
2828
'/this->(?!helper)\S*/iS',
2929
file_get_contents($file),
3030
'Access to members and methods of Block class through $this is ' .
@@ -51,7 +51,7 @@ public function testObsoleteBlockMethods()
5151
* @param string $file
5252
*/
5353
function ($file) {
54-
self::assertNotRegexp(
54+
self::assertDoesNotMatchRegularExpression(
5555
'/block->_[^_]+\S*\(/iS',
5656
file_get_contents($file),
5757
'Access to protected and private members of Block class is ' .
@@ -73,7 +73,7 @@ public function testObsoleteJavascriptAttributeType()
7373
* @param string $file
7474
*/
7575
function ($file) {
76-
self::assertNotRegexp(
76+
self::assertDoesNotMatchRegularExpression(
7777
'/type="text\/javascript"/',
7878
file_get_contents($file),
7979
'Please do not use "text/javascript" type attribute.'
@@ -97,7 +97,7 @@ function ($file) {
9797
if (strpos($file, '/view/frontend/templates/') !== false
9898
|| strpos($file, '/view/base/templates/') !== false
9999
) {
100-
self::assertNotRegexp(
100+
self::assertDoesNotMatchRegularExpression(
101101
'/(["\'])jquery\/ui\1/',
102102
file_get_contents($file),
103103
'Please do not use "jquery/ui" library in templates. Use needed jquery ui widget instead.'
@@ -124,7 +124,7 @@ function ($file) {
124124
&& (strpos($file, '/view/frontend/templates/') !== false
125125
|| strpos($file, '/view/base/templates/') !== false)
126126
) {
127-
self::assertNotRegExp(
127+
self::assertDoesNotMatchRegularExpression(
128128
'/data-mage-init=(?:\'|")(?!\s*{\s*"[^"]+")/',
129129
file_get_contents($file),
130130
'Please do not initialize JS component in php. Do it in template.'

0 commit comments

Comments
 (0)