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. 8.9.x core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php \Drupal\Tests\Core\Config\Entity\Query\QueryFactoryTest::getConfigObject()
  3. 10 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::testGetKeys in core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php
@covers ::getKeys @covers ::getValues
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 133

Class

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

Namespace

Drupal\Tests\Core\Config\Entity\Query

Code

protected function getConfigObject(string $name) : Config&MockObject {
    $config = $this->getMockBuilder(Config::class)
        ->disableOriginalConstructor()
        ->onlyMethods([
        '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.