public function register(AbstractTestCase $testCase) { $testCase->setTypePreference('Magium\\Magento\\Actions\\Checkout\\PaymentMethods\\PaymentMethodInterface', 'Magium\\Magento\\Actions\\Checkout\\PaymentMethods\\NoPaymentMethod'); $testCase->setTypePreference('Magium\\Magento\\Actions\\Checkout\\ShippingMethods\\ShippingMethodInterface', 'Magium\\Magento\\Actions\\Checkout\\ShippingMethods\\FirstAvailable'); $testCase->setTypePreference('Magium\\Themes\\ThemeConfigurationInterface', 'Magium\\Magento\\Themes\\AbstractThemeConfiguration'); $testCase->switchThemeConfiguration('Magium\\Magento\\Themes\\Magento19\\ThemeConfiguration'); }
protected function tearDown() { if ($this->_filename && file_exists($this->_filename)) { unlink($this->_filename); } parent::tearDown(); }
protected function tearDown() { if (file_exists($this->getCliConfigFilename())) { unlink($this->getCliConfigFilename()); } parent::tearDown(); }
protected function setUp() { $this->p1 = new Priority(); $this->p2 = new Priority(); RegistrationListener::addCallback($this->p1, 10); RegistrationListener::addCallback($this->p2, 0); parent::setUp(); }
protected function setUp() { $this->p1 = new SecondPriority(); $this->p2 = new SecondPriority(); // Note. Registration callbacks should not be set in a test case. They should be set in a module's // require_once or composer autoload. RegistrationListener::addCallback($this->p2, 0); RegistrationListener::addCallback($this->p1, 10); parent::setUp(); }
public function switchThemeConfiguration($fullyQualifiedClassName) { $reflection = new \ReflectionClass($fullyQualifiedClassName); if ($reflection->isSubclassOf('Magium\\Magento\\Themes\\NavigableThemeInterface')) { // Not entirely sure of hardcoding the various interface types. May make this configurable parent::switchThemeConfiguration($fullyQualifiedClassName); $this->setTypePreference('Magium\\Magento\\Themes\\AbstractThemeConfiguration', $fullyQualifiedClassName); $this->setTypePreference('Magium\\Magento\\Themes\\NavigableThemeInterface', $fullyQualifiedClassName); $this->setTypePreference('Magium\\Themes\\BaseThemeInterface', $fullyQualifiedClassName); $this->setTypePreference('Magium\\Magento\\Themes\\Customer\\AbstractThemeConfiguration', $this->getTheme()->getCustomerThemeClass()); $this->setTypePreference('Magium\\Magento\\Themes\\OnePageCheckout\\AbstractThemeConfiguration', $this->getTheme()->getCheckoutThemeClass()); } else { throw new InvalidConfigurationException('The theme configuration extend Magium\\Magento\\Themes\\NavigableThemeInterface'); } }
protected function setUp() { $this->initializer = new EspanolChromeInitializer(); parent::setUp(); }
public function setUp() { self::markTestSkipped('This test requires individual configuration'); parent::setUp(); }
public function setConfigurationProvider(AbstractTestCase $testCase) { $testCase->setTypePreference('Magium\\Util\\Configuration\\ConfigurationProviderInterface', 'Magium\\Util\\Configuration\\StandardConfigurationProvider'); $this->configurationProvider->configureDi($testCase->getDi()); }
<?php \Magium\AbstractTestCase::addBaseNamespace('Magium\\Mail');
protected function tearDown() { parent::tearDown(); $this->unlink(); }
public function __construct($name = null, array $data = [], $dataName = null, Initializer $initializer = null) { $initializer = new Initializer(null, null, new StandardConfigurationProvider(new ConfigurationReader(), new ClassConfigurationReader(realpath(__DIR__ . '/test_configuration')), new EnvironmentConfigurationReader())); parent::__construct($name, $data, $dataName, $initializer); }
protected function tearDown() { parent::tearDown(); unlink($this->filename); }
public function testAddingBaseNamespaceSucceedsWithClassResolution() { AbstractTestCase::addBaseNamespace('ArbitraryNamespace'); self::assertInstanceOf('ArbitraryNamespace\\Navigators\\TestNavigator', $this->getNavigator('TestNavigator')); }