Latest news

  • in

    My PHPUnit configuration for my Drupal projects (mglaman.dev)

    The other week, I was asked about how I maintain my PHPUnit config file for my Drupal projects. When running Drupal’s PHPUnit test suites, you typically copy and modify the distribution phpunit.xml.dist file which lives in the web/core subdirectory. There is just one problem. This directory is technically a vendor directory and is replaced during any updates to the drupal/core dependency of your Drupal project.

  • in

    Books/ Drupal 9 Module Development (www.therussianlullaby.com)

    For a long time I was thinking about write or not a review of the Drupal 8 Module Development (the former edition of the current). For me there were two very important keys: on the one hand, it was a very ambitious book in terms of scope and content (so it was an important challenge to make a synthesis on its simple review). On the other hand, Drupal 9 was already on its way and it was possible that it would be deprecated quickly.

  • in

    Running both Drush 8 (for Drupal 7) and Drush 10 (for Drupal 9) at the same time (webchick.net)

    These days, my life is all migrations, all the time, which means I often need to run Drupal 7 and Drupal 9 sites side-by-side simultaneously to compare the results.

    The latest version of Drush, Drush 10, only works on Drupal versions 8.4+. To use Drush on Drupal 7 sites, you need an older version, Drush 8. And both of them use the command drush. Tricksy…

  • in

    Do you need a Functional test for that? (glamanate.com)

    Drupal has four PHPUnit test suites: Unit, Kernel, Functional, and FunctionalJavascript. Each test suite offers various levels of integration with the Drupal code base.

    Unit tests are stateless

    Kernel tests allow for minimal Drupal bootstrapping for stateful testing with the database

    Functional tests perform a full Drupal installation and allow interacting with Drupal through a mocked browser

    FunctionalJavascript tests perform a full Drupal installation and allow interacting with Drupal through WebDriver.