ActionGroupMergeGenerationTest.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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 tests\util\MftfTestCase;
  8. class ActionGroupMergeGenerationTest extends MftfTestCase
  9. {
  10. /**
  11. * Tests flat generation of a hardcoded test file with no external references.
  12. *
  13. * @throws \Exception
  14. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  15. */
  16. public function testBasicActionGroup()
  17. {
  18. $this->generateAndCompareTest('BasicActionGroupTest');
  19. }
  20. /**
  21. * Test an ordinary action group with data
  22. *
  23. * @throws \Exception
  24. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  25. */
  26. public function testActionGroupWithData()
  27. {
  28. $this->generateAndCompareTest('ActionGroupWithDataTest');
  29. }
  30. /**
  31. * Test an action group with data overridden in arguments
  32. *
  33. * @throws \Exception
  34. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  35. */
  36. public function testActionGroupWithDataOverride()
  37. {
  38. $this->generateAndCompareTest('ActionGroupWithDataOverrideTest');
  39. }
  40. /**
  41. * Test an action group with no default data
  42. *
  43. * @throws \Exception
  44. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  45. */
  46. public function testActionGroupWithNoDefault()
  47. {
  48. $this->generateAndCompareTest('ActionGroupWithNoDefaultTest');
  49. }
  50. /**
  51. * Test an action group with persisted data
  52. *
  53. * @throws \Exception
  54. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  55. */
  56. public function testActionGroupWithPersistedData()
  57. {
  58. $this->generateAndCompareTest('ActionGroupWithPersistedData');
  59. }
  60. /**
  61. * Test an action group with top level persisted data
  62. *
  63. * @throws \Exception
  64. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  65. */
  66. public function testActionGroupWithTopLevelPersistedData()
  67. {
  68. $this->generateAndCompareTest('ActionGroupWithTopLevelPersistedData');
  69. }
  70. /**
  71. * Test an action group called multiple times
  72. *
  73. * @throws \Exception
  74. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  75. */
  76. public function testMultipleActionGroups()
  77. {
  78. $this->generateAndCompareTest('MultipleActionGroupsTest');
  79. }
  80. /**
  81. * Test an action group with a merge counterpart
  82. *
  83. * @throws \Exception
  84. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  85. */
  86. public function testMergedActionGroup()
  87. {
  88. $this->generateAndCompareTest('MergedActionGroupTest');
  89. }
  90. /**
  91. * Test an action group with arguments named similarly to elements
  92. *
  93. * @throws \Exception
  94. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  95. */
  96. public function testArgumentWithSameNameAsElement()
  97. {
  98. $this->generateAndCompareTest('ArgumentWithSameNameAsElement');
  99. }
  100. /**
  101. * Test an action group with a merge counterpart that's merged via insertBefore
  102. *
  103. * @throws \Exception
  104. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  105. */
  106. public function testMergedActionGroupViaInsertBefore()
  107. {
  108. $this->generateAndCompareTest('ActionGroupMergedViaInsertBefore');
  109. }
  110. /**
  111. * Test an action group with a merge counterpart that's merged via insertAfter
  112. *
  113. * @throws \Exception
  114. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  115. */
  116. public function testMergedActionGroupViaInsertAfter()
  117. {
  118. $this->generateAndCompareTest('ActionGroupMergedViaInsertAfter');
  119. }
  120. }