public function CKEditorPluginManagerTest::testGetEnabledButtons in Drupal 9
Same name and namespace in other branches
- 8 core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php \Drupal\Tests\ckeditor\Unit\CKEditorPluginManagerTest::testGetEnabledButtons()
@covers ::getEnabledButtons @dataProvider providerGetEnabledButtons
File
- core/
modules/ ckeditor/ tests/ src/ Unit/ CKEditorPluginManagerTest.php, line 88
Class
- CKEditorPluginManagerTest
- @coversDefaultClass \Drupal\ckeditor\CKEditorPluginManager
Namespace
Drupal\Tests\ckeditor\UnitCode
public function testGetEnabledButtons(array $toolbar_rows, array $expected_buttons) {
$editor = $this
->prophesize(Editor::class);
$editor
->getSettings()
->willReturn([
'toolbar' => [
'rows' => $toolbar_rows,
],
]);
$enabled_buttons = CKEditorPluginManager::getEnabledButtons($editor
->reveal());
$this
->assertEquals($expected_buttons, $enabled_buttons);
}