You are here

function PaymentformTestFieldFormatterWebTestCase::testPaymentformFieldFormatter in Payment 7

Test the paymentform field formatter.

File

modules/paymentform/tests/paymentform_test/tests/PaymentformTestFieldFormatterWebTestCase.test, line 32
Contains class PaymentformTestFieldFormatterWebTestCase.

Class

PaymentformTestFieldFormatterWebTestCase
Tests the paymentform field formatter.

Code

function testPaymentformFieldFormatter() {
  $node = $this
    ->drupalCreateNode(array(
    'type' => $this->content_type->type,
  ));
  $node->field_paymentform[LANGUAGE_NONE][0] = $this->PaymentLineItemData;
  node_save($node);
  $this
    ->drupalGet('node/' . $node->nid);
  $elements = $this
    ->xpath('//form[@id="payment-form-standalone"]');
  $this
    ->assertTrue(isset($elements[0]), 'The <em>Payment form</em> field formatter shows a payment form.');
}