You are here

private function ChartsDefaultSettingsTest::getDefaultColorsMock in Charts 8.3

Same name and namespace in other branches
  1. 8.4 tests/src/Unit/Settings/ChartsDefaultSettingsTest.php \Drupal\Tests\charts\Unit\Settings\ChartsDefaultSettingsTest::getDefaultColorsMock()
  2. 5.0.x tests/src/Unit/Settings/ChartsDefaultSettingsTest.php \Drupal\Tests\charts\Unit\Settings\ChartsDefaultSettingsTest::getDefaultColorsMock()

Get a default colors mock.

1 call to ChartsDefaultSettingsTest::getDefaultColorsMock()
ChartsDefaultSettingsTest::setUp in tests/src/Unit/Settings/ChartsDefaultSettingsTest.php

File

tests/src/Unit/Settings/ChartsDefaultSettingsTest.php, line 36

Class

ChartsDefaultSettingsTest
@coversDefaultClass \Drupal\charts\Settings\ChartsDefaultSettings @group charts

Namespace

Drupal\Tests\charts\Unit\Settings

Code

private function getDefaultColorsMock() {
  $chartsDefaultColors = $this
    ->prophesize(ChartsDefaultColors::class);
  $chartsDefaultColors
    ->getDefaultColors()
    ->willReturn([
    '#2f7ed8',
  ]);
  return $chartsDefaultColors
    ->reveal();
}