Skip to content

Commit dc7fbd4

Browse files
committed
Merge remote-tracking branch 'origin/AC-9486' into Arrows_Bugfix_20230921
2 parents 643d6b7 + 77361b1 commit dc7fbd4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

dev/tests/static/testsuite/Magento/Test/Integrity/ComposerTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ private function assertCodingStyle($contents)
171171
*/
172172
private function assertMagentoConventions($dir, $packageType, \StdClass $json)
173173
{
174-
$this->assertObjectHasAttribute('name', $json);
175-
$this->assertObjectHasAttribute('license', $json);
176-
$this->assertObjectHasAttribute('type', $json);
177-
$this->assertObjectHasAttribute('require', $json);
174+
$this->assertObjectHasProperty('name', $json);
175+
$this->assertObjectHasProperty('license', $json);
176+
$this->assertObjectHasProperty('type', $json);
177+
$this->assertObjectHasProperty('require', $json);
178178
$this->assertEquals($packageType, $json->type);
179179
if ($packageType !== 'project') {
180180
self::$dependencies[] = $json->name;
@@ -251,8 +251,8 @@ private function isVendorMagento(string $packageName): bool
251251
private function assertAutoloadRegistrar(\StdClass $json, $dir)
252252
{
253253
$error = 'There must be an "autoload->files" node in composer.json of each Magento component.';
254-
$this->assertObjectHasAttribute('autoload', $json, $error);
255-
$this->assertObjectHasAttribute('files', $json->autoload, $error);
254+
$this->assertObjectHasProperty('autoload', $json, $error);
255+
$this->assertObjectHasProperty('files', $json->autoload, $error);
256256
$this->assertTrue(in_array("registration.php", $json->autoload->files), $error);
257257
$this->assertFileExists("$dir/registration.php");
258258
}
@@ -268,7 +268,7 @@ private function assertNoVersionSpecified(\StdClass $json)
268268
{
269269
if (!in_array($json->name, self::$rootComposerModuleBlacklist)) {
270270
$errorMessage = 'Version must not be specified in the root and package composer JSON files in Git';
271-
$this->assertObjectNotHasAttribute('version', $json, $errorMessage);
271+
$this->assertObjectNotHasProperty('version', $json, $errorMessage);
272272
}
273273
}
274274

@@ -280,8 +280,8 @@ private function assertNoVersionSpecified(\StdClass $json)
280280
private function assertAutoload(\StdClass $json)
281281
{
282282
$errorMessage = 'There must be an "autoload->psr-4" section in composer.json of each Magento component.';
283-
$this->assertObjectHasAttribute('autoload', $json, $errorMessage);
284-
$this->assertObjectHasAttribute('psr-4', $json->autoload, $errorMessage);
283+
$this->assertObjectHasProperty('autoload', $json, $errorMessage);
284+
$this->assertObjectHasProperty('psr-4', $json->autoload, $errorMessage);
285285
}
286286

287287
/**
@@ -292,7 +292,7 @@ private function assertAutoload(\StdClass $json)
292292
private function assertNoMap(\StdClass $json)
293293
{
294294
$error = 'There is no "extra->map" node in composer.json of each Magento component.';
295-
$this->assertObjectNotHasAttribute('extra', $json, $error);
295+
$this->assertObjectNotHasProperty('extra', $json, $error);
296296
}
297297

298298
/**
@@ -321,7 +321,7 @@ private function assertConsistentModuleName(\SimpleXMLElement $xml, $packageName
321321
*/
322322
private function assertDependsOnPhp(\StdClass $json)
323323
{
324-
$this->assertObjectHasAttribute('php', $json, 'This component is expected to depend on certain PHP version(s)');
324+
$this->assertObjectHasProperty('php', $json, 'This component is expected to depend on certain PHP version(s)');
325325
}
326326

327327
/**
@@ -331,7 +331,7 @@ private function assertDependsOnPhp(\StdClass $json)
331331
*/
332332
private function assertDependsOnFramework(\StdClass $json)
333333
{
334-
$this->assertObjectHasAttribute(
334+
$this->assertObjectHasProperty(
335335
self::$magentoFrameworkLibraryName,
336336
$json,
337337
'This component is expected to depend on ' . self::$magentoFrameworkLibraryName

0 commit comments

Comments
 (0)