public function ConfigEntityStorageTest::getMockEntity in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest::getMockEntity()
- 9 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
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityStorageTest.php, line 714
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);
}