Tests text_plain formatter output.
function testPlainText() {
$value = $this
->randomString();
$value .= "\n\n<strong>" . $this
->randomString() . '</strong>';
$value .= "\n\n" . $this
->randomString();
$entity = $this
->createEntity(array());
$entity->{$this->field_name}->value = $value;
// Verify that all HTML is escaped and newlines are retained.
$this
->renderEntityFields($entity, $this->display);
$this
->assertText($value);
$this
->assertNoRaw($value);
$this
->assertRaw(nl2br(check_plain($value)));
}