ValidationStateTest.php 930 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Config\Test\Unit;
  7. class ValidationStateTest extends \PHPUnit\Framework\TestCase
  8. {
  9. /**
  10. * @param string $appMode
  11. * @param boolean $expectedResult
  12. * @dataProvider isValidationRequiredDataProvider
  13. */
  14. public function testIsValidationRequired($appMode, $expectedResult)
  15. {
  16. $model = new \Magento\Framework\App\Arguments\ValidationState($appMode);
  17. $this->assertEquals($model->isValidationRequired(), $expectedResult);
  18. }
  19. /**
  20. * @return array
  21. */
  22. public function isValidationRequiredDataProvider()
  23. {
  24. return [
  25. [\Magento\Framework\App\State::MODE_DEVELOPER, true],
  26. [\Magento\Framework\App\State::MODE_DEFAULT, false],
  27. [\Magento\Framework\App\State::MODE_PRODUCTION, false]
  28. ];
  29. }
  30. }