Skip to content

Commit

Permalink
Set default cache if null for testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
shishir-intelli committed Sep 26, 2023
1 parent 503a0ec commit d7a512b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ class MonetizationTeamsTest extends KernelTestBase {
protected function setUp(): void {
parent::setUp();

// Setting teams cache to 900 to make sure null value is not returned in getCacheMaxAge().
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('apigee_edge_teams.team_settings');

if (NULL === $config->get('cache_expiration')) {
$config->set('cache_expiration', 900);
$config->save(TRUE);
}
/** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
$this->entity_type_manager = $this->container->get('entity_type.manager');

Expand Down

0 comments on commit d7a512b

Please sign in to comment.