Score:1

How can I identify if my code needs a Unit test a Kernel test or a browser test?

co flag

In my project we extend base classes. BlockBase, ControllerBase, FormBase, FormatterBase and so on to build blocks, Fieldformatters, forms ...

We already have automated tests (functional) using a Testing automated framework based on Gherkin.

Since we are already running Functional tests, I understand there is no need to execute PHPUnit Functional,Browser, Kernel and Javascript scripts. Is my understanding correct?

If yes, what is left is Unit tests that extend the UnitTestCase class. I cannot understand how to test with Unit tests my code that extends base class. I cannot understand and find examples of how I can unit test a Block Plugin, A field Formatter or a Controller that extends Controller base, renders an entity and generates a page.

Can I perform Unit tests on the above?

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.