This is the Gist repository for my article Factory Lollipop - Speeding up Kernel tests on Drupal.
Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.
Feel free to read it the full article on Medium or check it out on Antistatique.
Content of this Gist :
- lollipop-example-01.php : Factory Lollipop inline usage example.
- NodeArticleFactory.php : Fully working Node Article Factory.
- NodeArticleFactory--no-resolve.php : Partial Factory containing the basic structure w/o implemented resolver.
- NodeArticleFactory--only-resolve.php: Example of Factory resolver to create Article Nodes.
- my_custom_module.services.yml : Service declaration for a Factory definition.
- MyKernelTest.php : Fully working Kernel tests using the Node Article Factory.
- MyKernelTest--no-create.php : Partial Kernel tests containing the basic structure to load a Factory Definition.
- MyKernelTest--only-create.php : Example of Kernel tests using the create method of Factory Lollipop.