Skip to content

Commit 87cd334

Browse files
committed
AC-8834::2.4.7-Beta1-Composer Integration Test Failures-PHP 8.2-phpunit deprecated assertclasshasattribute function is removed
1 parent 8fab341 commit 87cd334

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

dev/tests/integration/testsuite/Magento/Framework/App/ResourceConnection/ConnectionFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public function testCreate()
3636
];
3737
$connection = $this->model->create($dbConfig);
3838
$this->assertInstanceOf(\Magento\Framework\DB\Adapter\AdapterInterface::class, $connection);
39-
$this->assertClassHasAttribute('logger', get_class($connection));
39+
$this->assertIsObject($connection);
40+
$this->assertTrue(property_exists($connection, 'logger'));
4041
$object = new ReflectionClass(get_class($connection));
4142
$attribute = $object->getProperty('logger');
4243
$attribute->setAccessible(true);

dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ public function testNewInstance($actualClassName, array $properties = [], $expec
141141
$object = new ReflectionClass($actualClassName);
142142
if ($properties) {
143143
foreach ($properties as $propertyName => $propertyClass) {
144-
$this->assertClassHasAttribute($propertyName, $actualClassName);
144+
$this->assertIsObject($testObject);
145+
$this->assertTrue(property_exists($testObject, $propertyName));
145146
$attribute = $object->getProperty($propertyName);
146147
$attribute->setAccessible(true);
147148
$propertyObject = $attribute->getValue($testObject);

dev/tests/integration/testsuite/Magento/Framework/ProfilerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public function testApplyConfigWithDrivers(array $config, array $expectedDrivers
2525
{
2626
$profiler = new \Magento\Framework\Profiler();
2727
$profiler::applyConfig($config, '');
28-
$this->assertClassHasAttribute('_drivers', \Magento\Framework\Profiler::class);
28+
$this->assertIsObject($profiler);
29+
$this->assertTrue(property_exists($profiler, '_drivers'));
2930
$object = new ReflectionClass(\Magento\Framework\Profiler::class);
3031
$attribute = $object->getProperty('_drivers');
3132
$attribute->setAccessible(true);

dev/tests/integration/testsuite/Magento/ImportExport/Model/ExportTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public function testGetEntityAdapterWithValidEntity($entity, $expectedEntityType
3535
{
3636
$this->_model->setData(['entity' => $entity]);
3737
$this->_model->getEntityAttributeCollection();
38-
$this->assertClassHasAttribute('_entityAdapter', get_class($this->_model));
38+
$this->assertIsObject($this->_model);
39+
$this->assertTrue(property_exists($this->_model, '_entityAdapter'));
3940
$object = new ReflectionClass(get_class($this->_model));
4041
$attribute = $object->getProperty('_entityAdapter');
4142
$attribute->setAccessible(true);

0 commit comments

Comments
 (0)