Vinai Kopp

Magento Expert, Developer & Trainer

  • Why I promoting testing

    April 15, 2016

    The move from M1 to M2

    Since February 2015 more and more of my work has been about Magento 2. It includes (amongst others) thousands of unit and functional tests.

    My expectation was that many extension developers and integrators would immediately start picking up automated testing, too.
    The move to Magento 2 forced developers to part with old habits anyway, and while learning to work with the new platform, I hoped they would invest into learning testing skills, too.

    Forward to some day mid-January 2016. The first Magento 2 extensions where being released, and I realized it wasn’t happening on it’s own.
    Many of the extensions didn’t include any tests at all. Of course there are exceptions, however it seemed as if “no tests” still was the norm.

    It looked as if the chance to raise the overall quality of Magento implementations in our ecosystem was passing.

    Read more

  • 06. The Action Controller TDD Kata

    April 4, 2016

    Mage2Katas

    This kata is about creating a new Action Controller using TDD.

    We will use unit tests to flesh out the behavior of a simple action controller step by step, and we will use mocks to design the way it interacts with the business model layer classes.

    Read more

  • 05. The Route Config Kata

    March 21, 2016

    Mage2Katas

    This kata is about configuring a new route and creating an Action Controller.

    Why does it make sense to test-drive the creation of Action Controllers?
    We want our test to ensure our route configuration is correct and we also want the tests to catch conflicts with other extensions.

    As always for configuration, we will be using integration tests only during this kata.

    Read more

  • 04. The Plugin Integration Test Kata

    March 7, 2016

    Mage2Katas

    Welcome to the plugin integration test kata!

    In this episode we will write an integration test that not only validates some configuration, but instead checks all parts working together produce the desired result.

    Integration tests provide a huge value and are essential to have in addition to the unit tests created while doing TDD.

    For this kata we will assume the plugin already exists and is configured. If you would like a reminder on the details that, please check out the previous 3 episodes.

    Read more

  • 03. The Around Interceptor Kata

    February 22, 2016

    Mage2Katas

    The scenario for this kata is that we want to create a plugin that gets called around the CustomerRepositoryInterface::save() method.

    The plugin should call an external API method whenever a new customer registers. For this kata we are not concerned about the details of the external API, it will be enough if we simply call a method on a class under the right conditions.

    Read more