/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Config/Test/Unit/ValidationStateTest.php
38 строк
966 B
Manish Ranjan
AC-16248: PHPUnit 12 Upgrade | Fix Framework unit tests
09 янв 2026, 19:35
09 янв 2026, 19:35
de6cafc
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ declare(strict_types=1); namespace Magento\Framework\Config\Test\Unit; use Magento\Framework\App\Arguments\ValidationState; use Magento\Framework\App\State; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; class ValidationStateTest extends TestCase { /** * @param string $appMode * @param boolean $expectedResult */ #[DataProvider('isValidationRequiredDataProvider')] public function testIsValidationRequired($appMode, $expectedResult) { $model = new ValidationState($appMode); $this->assertEquals($model->isValidationRequired(), $expectedResult); } /** * @return array */ public static function isValidationRequiredDataProvider() { return [ [State::MODE_DEVELOPER, true], [State::MODE_DEFAULT, false], [State::MODE_PRODUCTION, false] ]; } }