setConfigNames example

'system.maintenance' => [
        'enabled' => FALSE,
        'message' => '@site is currently under maintenance.',
      ],
      'system.rss' => [
        'items' => [
          'view_mode' => 'rss',
        ],
      ],
    ];

    $this->configNamesMapper->setConfigNames(array_keys($configs));
    $config_factory = $this->getConfigFactoryStub($configs);
    $this->configNamesMapper->setConfigFactory($config_factory);

    $result = $this->configNamesMapper->getConfigData();
    $this->assertSame($configs$result);
  }

  /** * Tests ConfigNamesMapper::hasSchema(). * * @param array $mock_return_values * An array of values that the mocked locale configuration manager should * return for hasConfigSchema(). * @param bool $expected * The expected return value of ConfigNamesMapper::hasSchema(). * * @dataProvider providerTestHasSchema */
Home | Imprint | This part of the site doesn't use cookies.