示例#1
0
 /**
  * Prepare data from text to values.
  *
  * @param FixtureInterface $fixture
  * @return array
  */
 protected function prepareData($fixture)
 {
     /** @var CustomerBalance $fixture */
     $customer = $fixture->getDataFieldConfig('customer_id')['source']->getCustomer();
     /** @var Website $website */
     $website = $fixture->getDataFieldConfig('website_id')['source']->getWebsite();
     /** @var Customer $customer */
     return ['customer_id' => $customer->getId(), 'customerbalance' => ['amount_delta' => $fixture->getAmountDelta(), 'website_id' => $website->getWebsiteId(), 'comment' => $fixture->getComment()]];
 }