function ConfigEntityStorageTest::getMockEntity
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest::getMockEntity()
- 8.9.x core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest::getMockEntity()
- 11.x core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest::getMockEntity()
Creates an entity with specific methods mocked.
Parameters
array $values: (optional) Values to pass to the constructor.
array $methods: (optional) The methods to mock.
Return value
\Drupal\Core\Entity\EntityInterface|\PHPUnit\Framework\MockObject\MockObject
9 calls to ConfigEntityStorageTest::getMockEntity()
- ConfigEntityStorageTest::setUp in core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php - @covers ::__construct
- ConfigEntityStorageTest::testCreate in core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php - @covers ::create @covers ::doCreate
- ConfigEntityStorageTest::testCreateWithPredefinedUuid in core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php - @covers ::create @covers ::doCreate
- ConfigEntityStorageTest::testDelete in core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php - @covers ::delete @covers ::doDelete
- ConfigEntityStorageTest::testSaveChangedUuid in core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php - @covers ::save @covers ::doSave
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php, line 722
Class
- ConfigEntityStorageTest
- @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityStorage @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
public function getMockEntity(array $values = [], $methods = []) {
return $this->getMockForAbstractClass(ConfigEntityBase::class, [
$values,
'test_entity_type',
], '', TRUE, TRUE, TRUE, $methods);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.