You are here

function PaymentformTestFieldWebTestCase::testPaymentformFieldStorage in Payment 7

Test the paymentform field storage.

File

modules/paymentform/tests/paymentform_test/tests/PaymentformTestFieldWebTestCase.test, line 111
Contains class PaymentformTestFieldWebTestCase.

Class

PaymentformTestFieldWebTestCase
Tests the paymentform field.

Code

function testPaymentformFieldStorage() {
  $node = $this
    ->drupalCreateNode(array(
    'type' => $this->content_type->type,
  ));
  $node->field_paymentform[LANGUAGE_NONE][0] = $this->PaymentLineItemData;
  node_save($node);
  $node = node_load($node->nid, NULL, TRUE);
  $diff = array_diff_assoc($node->field_paymentform[LANGUAGE_NONE][0], $this->PaymentLineItemData);
  $this
    ->assertTrue(is_array($diff) && empty($diff), 'Payment line item data is saved and loaded correctly.');
}