TestCase.php 557 B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\TestFramework\Indexer;
  7. class TestCase extends \PHPUnit\Framework\TestCase
  8. {
  9. public static function tearDownAfterClass()
  10. {
  11. $db = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getBootstrap()
  12. ->getApplication()
  13. ->getDbInstance();
  14. if (!$db->isDbDumpExists()) {
  15. throw new \LogicException('DB dump does not exist.');
  16. }
  17. $db->restoreFromDbDump();
  18. }
  19. }