public function InstantArticleContentEntityNormalizerTest::testSortComponents in Facebook Instant Articles 8.2
Same name and namespace in other branches
- 3.x tests/src/Unit/InstantArticleContentEntityNormalizerTest.php \Drupal\Tests\fb_instant_articles\Unit\InstantArticleContentEntityNormalizerTest::testSortComponents()
Tests the sortComponents() method.
@dataProvider sortComponentsProvider @covers ::sortComponents
File
- tests/
src/ Unit/ InstantArticleContentEntityNormalizerTest.php, line 104
Class
- InstantArticleContentEntityNormalizerTest
- Tests the fbia content entity normalizer class.
Namespace
Drupal\Tests\fb_instant_articles\UnitCode
public function testSortComponents($components, $expected) {
uasort($components, [
InstantArticleContentEntityNormalizer::class,
'sortComponents',
]);
// Re-key the array for equality check.
$components = array_values($components);
$this
->assertEquals($expected, $components);
}