function FilterFormatRepositoryTest::testGetAllFormats

Same name and namespace in other branches
  1. 11.x core/modules/filter/tests/src/Kernel/FilterFormatRepositoryTest.php \Drupal\Tests\filter\Kernel\FilterFormatRepositoryTest::testGetAllFormats()

@legacy-covers ::getAllFormats

File

core/modules/filter/tests/src/Kernel/FilterFormatRepositoryTest.php, line 59

Class

FilterFormatRepositoryTest
Tests the Drupal\filter\FilterFormatRepositoryInterface service.

Namespace

Drupal\Tests\filter\Kernel

Code

public function testGetAllFormats() : void {
  // The 'plain_text' format weight is 10.
  $this->assertSame([
    'bar',
    'plain_text',
    'foo',
  ], array_keys($this->repository
    ->getAllFormats()));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.