Score:0

Mock user with fields to use in a functional test

bo flag

How is it possible to mock a user with some simple text fields (for example, First name and Last name) in a functional test (which extends BrowserTestBase) without creating the configuration for this in the config/optional or config/install directory?

Kevin avatar
in flag
You can create field storage and field config inline during ::setUp() phase
Kevin avatar
in flag
... and then create test users for the tests
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.