public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $plugin = new Plugin();
     $plugin->setName('TestInvalidPlugin');
     $plugin->setSource('Local');
     $plugin->setNamespace('Backend');
     $plugin->setLabel('Invalid Plugin');
     $plugin->setVersion('1.0');
     $manager = Shopware()->Models();
     $manager->persist($plugin);
     $manager->flush($plugin);
 }
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $helper = \TestHelper::Instance();
     $loader = $helper->Loader();
     $pluginDir = $helper->DocPath() . 'engine/Shopware/Plugins/Default/Core/PaymentMethods';
     $loader->registerNamespace('ShopwarePlugin\\PaymentMethods\\Components', $pluginDir . '/Components/');
     //Debit needs to be active for this. Also, we need to save existing status to later restore it
     $debitPaymentMean = Shopware()->Models()->getRepository('\\Shopware\\Models\\Payment\\Payment')->findOneByName('debit');
     self::$debitStatus = $debitPaymentMean->getActive();
     $debitPaymentMean->setActive(true);
     Shopware()->Models()->flush($debitPaymentMean);
     self::$debitPaymentMethod = new DebitPaymentMethod();
 }