You are here

public function CustomFormattersGeneralTestCase::testCustomFormattersEngineHtmlToken in Custom Formatters 7.2

Test the HTML + Token engine.

File

tests/custom_formatters.general.test, line 121
Tests for the Custom Fomratters module.

Class

CustomFormattersGeneralTestCase
Class FileFieldPathsGeneralTestCase.

Code

public function testCustomFormattersEngineHtmlToken() {

  // Create a Custom formatter.
  $text = $this
    ->randomName();
  $this->formatter = $this
    ->createCustomFormatter(array(
    'mode' => 'token',
    'code' => $text,
  ));

  // Set the formatter active on the Body field.
  $this
    ->setCustomFormatter($this->formatter->name, 'body', 'article');

  // Ensure Formatter rendered correctly.
  $this
    ->drupalGet("node/{$this->node->nid}");
  $this
    ->assertText($text, t('Custom formatter output found.'));
}