private function ChartsSettingsServiceTest::createChartsSettingsService in Charts 8.3
Same name and namespace in other branches
- 8.4 tests/src/Unit/Services/ChartsSettingsServiceTest.php \Drupal\Tests\charts\Unit\Services\ChartsSettingsServiceTest::createChartsSettingsService()
- 5.0.x tests/src/Unit/Services/ChartsSettingsServiceTest.php \Drupal\Tests\charts\Unit\Services\ChartsSettingsServiceTest::createChartsSettingsService()
Create a ChartsSettingsService object.
Parameters
array $config: A default module configuration.
Return value
\Drupal\charts\Services\ChartsSettingsService ChartsSettingsService object to be tested.
1 call to ChartsSettingsServiceTest::createChartsSettingsService()
- ChartsSettingsServiceTest::testGetChartsSettings in tests/
src/ Unit/ Services/ ChartsSettingsServiceTest.php - Tests if the default chart settings are available.
File
- tests/
src/ Unit/ Services/ ChartsSettingsServiceTest.php, line 53
Class
- ChartsSettingsServiceTest
- @coversDefaultClass \Drupal\charts\Services\ChartsSettingsService @group charts
Namespace
Drupal\Tests\charts\Unit\ServicesCode
private function createChartsSettingsService(array $config) {
return new ChartsSettingsService($this
->getConfigFactoryStub([
'charts.settings' => [
'charts_default_settings' => $config,
],
]));
}