public function ChartsDefaultSettingsTest::setUp in Charts 5.0.x
Same name and namespace in other branches
- 8.4 tests/src/Unit/Settings/ChartsDefaultSettingsTest.php \Drupal\Tests\charts\Unit\Settings\ChartsDefaultSettingsTest::setUp()
- 8.3 tests/src/Unit/Settings/ChartsDefaultSettingsTest.php \Drupal\Tests\charts\Unit\Settings\ChartsDefaultSettingsTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Settings/ ChartsDefaultSettingsTest.php, line 25
Class
- ChartsDefaultSettingsTest
- @coversDefaultClass \Drupal\charts\Settings\ChartsDefaultSettings @group charts
Namespace
Drupal\Tests\charts\Unit\SettingsCode
public function setUp() {
parent::setUp();
$chartsDefaultColorsMock = $this
->getDefaultColorsMock();
$this->chartsDefaultSettings = new ChartsDefaultSettings();
$colorsProperty = new \ReflectionProperty(ChartsDefaultSettings::class, 'colors');
$colorsProperty
->setAccessible(TRUE);
$colorsProperty
->setValue($this->chartsDefaultSettings, $chartsDefaultColorsMock);
}