function SmartDefaultSettingsTest::testCandidates
@covers ::getCandidates
      
    
@covers ::selectCandidate
      
    
@dataProvider providerCandidates
File
- 
              core/
modules/ ckeditor5/ tests/ src/ Unit/ SmartDefaultSettingsTest.php, line 83  
Class
- SmartDefaultSettingsTest
 - @coversDefaultClass \Drupal\ckeditor5\SmartDefaultSettings[[api-linebreak]] @group ckeditor5
 
Namespace
Drupal\Tests\ckeditor5\UnitCode
public function testCandidates(HTMLRestrictions $provided, HTMLRestrictions $still_needed, array $disabled_plugin_definitions, array $expected_candidates, array $expected_selection = []) : void {
  $get_candidates = self::getMethod(SmartDefaultSettings::class, 'getCandidates');
  $this->assertSame($expected_candidates, $get_candidates->invoke(NULL, $provided, $still_needed, $disabled_plugin_definitions));
  $select_candidate = self::getMethod(SmartDefaultSettings::class, 'selectCandidate');
  $this->assertSame($expected_selection, $select_candidate->invoke(NULL, $expected_candidates, $still_needed, array_keys($provided->getAllowedElements())));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.