function QueryFactoryTest::getConfigObject

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php \Drupal\Tests\Core\Config\Entity\Query\QueryFactoryTest::getConfigObject()
  2. 10 core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php \Drupal\Tests\Core\Config\Entity\Query\QueryFactoryTest::getConfigObject()
  3. 11.x 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.