/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
dev/tests/integration/testsuite/Magento/Customer/Helper/AddressTest.php
45 строк
1 KB
Raj Mohan R
AC-16236::Upgrade Core Test Framework to PHPUnit 12 and Migrate from PHPUnit 10
11 фев 2026, 13:51
11 фев 2026, 13:51
152ed41
Код
Авторство
О чём код?
<?php /** * Copyright 2014 Adobe * All Rights Reserved. */ namespace Magento\Customer\Helper; use PHPUnit\Framework\Attributes\DataProvider; class AddressTest extends \PHPUnit\Framework\TestCase { /** @var \Magento\Customer\Helper\Address */ protected $helper; protected function setUp(): void { $this->helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( \Magento\Customer\Helper\Address::class ); } /** * @param $attributeCode */ #[DataProvider('getAttributeValidationClass')] public function testGetAttributeValidationClass($attributeCode, $expectedClass) { $this->assertEquals($expectedClass, $this->helper->getAttributeValidationClass($attributeCode)); } public static function getAttributeValidationClass() { return [ ['bad-code', ''], ['city', 'required-entry'], ['company', ''], ['country_id', 'required-entry'], ['fax', ''], ['firstname', 'required-entry'], ['lastname', 'required-entry'], ['middlename', ''], ['postcode', ''] ]; } }