XmlDuplicateGenerationTest.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace tests\verification\Tests;
  7. use Magento\FunctionalTestingFramework\Test\Handlers\ActionGroupObjectHandler;
  8. use Magento\FunctionalTestingFramework\Test\Handlers\TestObjectHandler;
  9. use tests\util\MftfTestCase;
  10. class XmlDuplicateGerationTest extends MftfTestCase
  11. {
  12. const XML_DUPLICATE_TEST = 'XmlDuplicateTest';
  13. const XML_DUPLICATE_ACTIONGROUP = 'xmlDuplicateActionGroup';
  14. const XML_DUPLICATE_MERGE_TEST = 'BasicDupedActionTest';
  15. const RESOURCES_PATH = __DIR__ . '/../Resources';
  16. /**
  17. * Tests flat generation of a hardcoded test file with no external references.
  18. */
  19. public function testDuplicatesInTest()
  20. {
  21. TestObjectHandler::getInstance()->getObject(self::XML_DUPLICATE_TEST);
  22. $this->addToAssertionCount(1); // No exception thrown thus far, can assert dupes didn't cause an error.
  23. }
  24. public function testDuplicatesInActionGroup()
  25. {
  26. ActionGroupObjectHandler::getInstance()->getObject(self::XML_DUPLICATE_ACTIONGROUP);
  27. $this->addToAssertionCount(1); // No exception thrown thus far, can assert dupes didn't cause an error.
  28. }
  29. /**
  30. * Parser testing, makes sure test action nodes are marked as array.
  31. */
  32. public function testDuplicatesInMergeTest()
  33. {
  34. TestObjectHandler::getInstance()->getObject(self::XML_DUPLICATE_MERGE_TEST);
  35. $this->addToAssertionCount(1); // No exception thrown thus far, can assert dupes didn't cause an error.
  36. }
  37. }