<?php

declare(strict_types=1);

namespace Crossroads\Magento\Test\Unit;

use Mage;
use PHPUnit\Framework\TestCase as BaseCase;

/**
 * @runTestsInSeparateProcesses
 * @preserveGlobalState disabled
 */
class TestCase extends BaseCase {
    public function setUp(): void {
        if( ! class_exists("Mage", false)) {
            class_alias(__NAMESPACE__ . "\\Mock\\Mage", "Mage");
            class_alias(__NAMESPACE__ . "\\Mock\\AbstractModel", "Mage_Core_Model_Abstract");
            class_alias(__NAMESPACE__ . "\\Mock\\Store", "Mage_Core_Model_Store");
            class_alias(__NAMESPACE__ . "\\Mock\\VarienObject", "Varien_Object");
        }

        Mage::reset();
    }
}
