You are here

function PaymentformTestLineItemFieldWidgetWebTestCase::testPaymentformLineItemFieldWidgetInputElements in Payment 7

Test the widget's presence.

File

modules/paymentform/tests/paymentform_test/tests/PaymentformTestLineItemFieldWidgetWebTestCase.test, line 34

Class

PaymentformTestLineItemFieldWidgetWebTestCase
Tests the paymentform_line_item field widget.

Code

function testPaymentformLineItemFieldWidgetInputElements() {
  $web_user = $this
    ->drupalCreateUser(array(
    'create ' . $this->content_type->type . ' content',
  ));
  $this
    ->drupalLogin($web_user);
  $this
    ->drupalGet('node/add/page');
  $elements = $this
    ->xpath('//div[@id="edit-field-paymentform-und-line-item-container-0"]');
  $this
    ->assertTrue(isset($elements[0]), 'The <em>Payment line item configuration</em> field widget shows the <em>payment_line_item</em> form element.');
}