/** * @return mixed */ public function buildAndRegister() { $this->invokeProvidersMethods(); $fixtureId = ApiRoleHelper::create($this->_data['fixture']['attributes']); Builder::registerFixture(Builder::API_ROLE_FIXTURE_TYPE, $fixtureId, $this->_getHook()); return $fixtureId; }
/** * @param Mage_Core_Model_Abstract $model * @param string $fixtureType * @param $entry * @param $key * * @return string * @throws \Exception */ protected function _deleteAndUnregisterFixture(Mage_Core_Model_Abstract $model, $fixtureType, $entry, $key) { $fixture = $model->load((int) $entry); $fixture->delete(); Builder::unregister($key); return $this->_deleteFixtureMessage($fixtureType, $entry); }
/** * @param $node * * @return array */ protected function _buildManySimple($node) { $products = $this->_data['fixture'][$node]['products']; return FixtureBuilder::buildMany(FixtureBuilder::SIMPLE_PRODUCT_FIXTURE_TYPE, $this, $products, $this->getHook()); }
/** * * @throws Exception */ protected function _buildOauthConsumerFixture() { FixtureBuilder::build(FixtureBuilder::OAUTH_CONSUMER_FIXTURE_TYPE, new FixturesLocator(), 'oauth-consumer.yml', '@AfterSuite'); }
/** * @return array */ protected static function _getBuilderRegistry() { return FixtureBuilder::getRegistry(); }
/** * @param array $customerRegisterData * @param array $customerData */ protected function _setupCheckoutMethodCustomer(array $customerRegisterData, array $customerData) { if (Checkout::isCustomerCheckout($customerRegisterData)) { $customers = Builder::buildMany(Builder::CUSTOMER_FIXTURE_TYPE, $this, [$customerData], $this->getHook()); if (count($customers)) { $this->getMageModel()->setCustomer($customers[0]); } } }