You are here

public function EntityLegalMethodsTestCase::testProfileFormInlineMethod in Entity Legal 7

Same name and namespace in other branches
  1. 7.2 tests/entity_legal.methods.test \EntityLegalMethodsTestCase::testProfileFormInlineMethod()

User signup form with inline method test.

File

tests/entity_legal.methods.test, line 131
Test for defined methods in Entity Legal module.

Class

EntityLegalMethodsTestCase
Simpletest class for acceptance methods.

Code

public function testProfileFormInlineMethod() {
  $document = $this
    ->createDocument(TRUE, TRUE, array(
    'new_users' => array(
      'require_method' => 'form_inline',
    ),
  ));
  $this
    ->createDocumentVersion($document, TRUE);
  $this
    ->drupalGet('user/register');
  $this
    ->assertFieldByName('legal_' . $document
    ->identifier(), NULL, 'Agree checkbox found');
  $this
    ->assertRaw('<div class="entity entity-legal-document-version legal-document-version-' . $document
    ->identifier(), 'Document markup found on register page');
}