You are here

public function ConfigEntityStorageTest::getMockEntity in Drupal 9

Same name and namespace in other branches
  1. 8 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

... See full list

File

core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php, line 725

Class

ConfigEntityStorageTest
@coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityStorage @group Config

Namespace

Drupal\Tests\Core\Config\Entity

Code

public function getMockEntity(array $values = [], $methods = []) {
  return $this
    ->getMockForAbstractClass(ConfigEntityBase::class, [
    $values,
    'test_entity_type',
  ], '', TRUE, TRUE, TRUE, $methods);
}