You are here

protected function QueryFactoryTest::getConfigObject in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php \Drupal\Tests\Core\Config\Entity\Query\QueryFactoryTest::getConfigObject()

Gets a test configuration object.

Parameters

string $name: The config name.

Return value

\Drupal\Core\Config\Config|\PHPUnit\Framework\MockObject\MockObject The test configuration object.

2 calls to QueryFactoryTest::getConfigObject()
QueryFactoryTest::providerTestGetKeys in core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php
QueryFactoryTest::testGetKeysWildCardEnd in core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php
@covers ::getKeys @covers ::getValues

File

core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php, line 128

Class

QueryFactoryTest
@coversDefaultClass \Drupal\Core\Config\Entity\Query\QueryFactory @group Config

Namespace

Drupal\Tests\Core\Config\Entity\Query

Code

protected function getConfigObject($name) {
  $config = $this
    ->getMockBuilder('Drupal\\Core\\Config\\Config')
    ->disableOriginalConstructor()
    ->setMethods([
    'save',
    'delete',
  ])
    ->getMock();
  return $config
    ->setName($name);
}