You are here

public function InstantArticleContentEntityNormalizerTest::testNormalizeRtl in Facebook Instant Articles 3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/InstantArticleContentEntityNormalizerTest.php \Drupal\Tests\fb_instant_articles\Unit\InstantArticleContentEntityNormalizerTest::testNormalizeRtl()

Tests the normalize method on an RTL site.

@covers ::normalize

File

tests/src/Unit/InstantArticleContentEntityNormalizerTest.php, line 90

Class

InstantArticleContentEntityNormalizerTest
Tests the fbia content entity normalizer class.

Namespace

Drupal\Tests\fb_instant_articles\Unit

Code

public function testNormalizeRtl() {
  $normalizer = $this
    ->getContentEntityNormalizer([], [], LanguageInterface::DIRECTION_RTL);
  $now = time();
  $entity = $this
    ->getContentEntity(NodeInterface::class, '/node/1', 'Test entity', $now, $now, 'Joe Mayo');
  $article = $normalizer
    ->normalize($entity, 'fbia');
  $this
    ->assertTrue($article
    ->isRTLEnabled());
}