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');
 }
Example #2
0
 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');
     }
 }
Example #7
0
 protected function setUp()
 {
     $this->initializer = new EspanolChromeInitializer();
     parent::setUp();
 }
Example #8
0
 public function setUp()
 {
     self::markTestSkipped('This test requires individual configuration');
     parent::setUp();
 }
Example #9
0
 public function setConfigurationProvider(AbstractTestCase $testCase)
 {
     $testCase->setTypePreference('Magium\\Util\\Configuration\\ConfigurationProviderInterface', 'Magium\\Util\\Configuration\\StandardConfigurationProvider');
     $this->configurationProvider->configureDi($testCase->getDi());
 }
Example #10
0
<?php

\Magium\AbstractTestCase::addBaseNamespace('Magium\\Mail');
Example #11
0
 protected function tearDown()
 {
     parent::tearDown();
     $this->unlink();
 }
Example #12
0
 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);
 }
Example #13
0
 protected function tearDown()
 {
     parent::tearDown();
     unlink($this->filename);
 }
Example #14
0
 public function testAddingBaseNamespaceSucceedsWithClassResolution()
 {
     AbstractTestCase::addBaseNamespace('ArbitraryNamespace');
     self::assertInstanceOf('ArbitraryNamespace\\Navigators\\TestNavigator', $this->getNavigator('TestNavigator'));
 }