You are here

protected function EntityTranslationToggleFieldsTranslatabilityTestCase::createUntranslatedPage in Entity Translation 7

Create a "Basic page" in the specified language.

Parameters

$title: Title of the basic page in the specified language.

$body: Body of the basic page in the specified language.

2 calls to EntityTranslationToggleFieldsTranslatabilityTestCase::createUntranslatedPage()
EntityTranslationToggleFieldsTranslatabilityTestCase::testTogglingFieldsWithDataNonRevisionable in tests/entity_translation.test
Tests toggling translatability on fields with data (non-revisionable).
EntityTranslationToggleFieldsTranslatabilityTestCase::testTogglingFieldsWithDataRevisionable in tests/entity_translation.test
Tests toggling translatability on fields with data (revisionable).

File

tests/entity_translation.test, line 1033
Tests for Entity translation module.

Class

EntityTranslationToggleFieldsTranslatabilityTestCase
Tests for enabling fields to use Entity Translation or disabling them.

Code

protected function createUntranslatedPage($title, $body) {
  $edit = array(
    'title' => $title,
    'body[und][0][value]' => $body,
  );
  $this
    ->drupalPost('node/add/page', $edit, t('Save'));
  $this
    ->assertRaw(t('Basic page %title has been created.', array(
    '%title' => $title,
  )), t('Basic page created.'));

  // Check to make sure the node was created.
  $node = $this
    ->drupalGetNodeByTitle($title);
  $this
    ->assertTrue($node, t('Node found in database.'));
  return $node;
}