function HTMLRestrictionsTest::testCounting
@covers ::allowsNothing
      
    
@covers ::getAllowedElements
      
    
@dataProvider providerCounting
File
- 
              core/
modules/ ckeditor5/ tests/ src/ Unit/ HTMLRestrictionsTest.php, line 162  
Class
- HTMLRestrictionsTest
 - @coversDefaultClass \Drupal\ckeditor5\HTMLRestrictions[[api-linebreak]] @group ckeditor5
 
Namespace
Drupal\Tests\ckeditor5\UnitCode
public function testCounting(array $elements, bool $expected_is_empty, int $expected_concrete_only_count, int $expected_concrete_plus_wildcard_count) : void {
  $r = new HTMLRestrictions($elements);
  $this->assertSame($expected_is_empty, $r->allowsNothing());
  $this->assertCount($expected_concrete_only_count, $r->getAllowedElements());
  $this->assertCount($expected_concrete_only_count, $r->getAllowedElements(TRUE));
  $this->assertCount($expected_concrete_plus_wildcard_count, $r->getAllowedElements(FALSE));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.