MutableDataInterface.php 725 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\TestFramework\TestCase;
  7. /**
  8. * This interface allows to add data to test case dynamically, for example from startTest listeners
  9. * in order to reuse it later.
  10. */
  11. interface MutableDataInterface
  12. {
  13. /**
  14. * Set data providers data.
  15. *
  16. * @param array $data
  17. * @return void
  18. */
  19. public function setData(array $data);
  20. /**
  21. * Retrieve data injected dynamically in test case.
  22. *
  23. * @return array
  24. */
  25. public function getData();
  26. /**
  27. * Revert data to default dataProviders data.
  28. *
  29. * @return void
  30. */
  31. public function flushData();
  32. }