Closed (fixed)
Project:
Test Helpers
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
23 Sep 2022 at 09:17 UTC
Updated:
23 Sep 2022 at 10:45 UTC
Jump to comment: Most recent
Seems there is a problem with addTranslation() method in mocked entity stubs.
$block1Values = [
'type' => 'my_blocktype',
];
$block1 = $this->entityStubFactory->create(BlockContent::class, $block1Values);
$block1->addTranslation('en', $block1Values);
$block1->save()
Is showing the error:
Error: Call to a member function getValue() on null
/var/www/html/docroot/core/lib/Drupal/Core/Field/FieldItemList.php:50Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
murzI've implemented a rework of some mocks, that fixes this problem. Merged.
Comment #5
murzComment #6
murz