WidgetConfigFilesTest.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Tests that existing widget.xml files are valid to schema individually and merged.
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Test\Integrity\Modular;
  9. use Magento\Framework\Component\ComponentRegistrar;
  10. class WidgetConfigFilesTest extends \Magento\TestFramework\TestCase\AbstractConfigFiles
  11. {
  12. /**
  13. * Returns the reader class name that will be instantiated via ObjectManager
  14. *
  15. * @return string reader class name
  16. */
  17. protected function _getReaderClassName()
  18. {
  19. return \Magento\Widget\Model\Config\Reader::class;
  20. }
  21. /**
  22. * Returns a string that represents the path to the config file
  23. *
  24. * @return string
  25. */
  26. protected function _getConfigFilePathGlob()
  27. {
  28. return 'etc/widget.xml';
  29. }
  30. /**
  31. * Returns an absolute path to the XSD file corresponding to the XML files specified in _getConfigFilePathGlob
  32. *
  33. * @return string
  34. */
  35. protected function _getXsdPath()
  36. {
  37. return $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Magento_Widget')
  38. . '/etc/widget_file.xsd';
  39. }
  40. }