public function BrandingGraphQLTest::testBrandingColorsCanReturnNull in Open Social 10.2.x
Test that the platform branding colors can return null.
File
- modules/
social_features/ social_branding/ tests/ src/ Kernel/ GraphQL/ BrandingGraphQLTest.php, line 337
Class
- BrandingGraphQLTest
- Base class for branding related GraphQL tests.
Namespace
Drupal\Tests\social_branding\Kernel\GraphQLCode
public function testBrandingColorsCanReturnNull() : void {
$system_theme = $this
->config('system.theme');
// Change default theme.
$system_theme
->set('default', 'bootstrap')
->save();
// Set anonymous user.
$this
->setUpCurrentUser();
$this
->assertResults('
query {
platformBranding {
brandingColors {
primary {
hexRGB
css
rgba {
alpha
blue
green
red
}
}
}
}
}
', [], [
'platformBranding' => [
'brandingColors' => NULL,
],
], $this
->defaultCacheMetaData()
->addCacheableDependency($system_theme));
}