2013. december 10.

Prepare! Prepare! for… PHPUnit tests


The Migrate in Core group of people working on Drupal 8 is preparing some meta issues


The Migrate in Core group of people working on Drupal 8 is preparing some meta issues, making doable sub issues, and improving documentation, for:

  • people new to Drupal contribution but not new to PHPUnit,
  • people new to PHPUnit but not new to Drupal contribution.

Let's get ready to help with those small doable sub issues.


Let's prepare to work on those issues, by first doing something simple: running Drupal's PHPUnit tests. If you have Drupal 8, you have PHPUnit already. Start with a git clone of Drupal 8.x (and git pull --rebase).

Now, run them. The Drupal.org documentation page Running PHPUnit tests has lots of helpful information. It covers running all tests, listing groups, running only tests in a group, or only a single test class, and also how to generate a code coverage report. And anyone, you, can edit the doc page to improve it if you like.

Ran the tests? Cool. You are prepared. :) The community is working on improved help documentation for how to get started writing tests. I'll let you know when it posts. But, if you can't wait, join the migrate in core group, or the general core issue [Meta] Convert UnitTestBase to PHPUnit has work going on.

[Migrate in core? Yep. See Dries's recent outline for Drupal 8 betas or go way back for some history in an issue.]

More good d.o docs

Recently when I had to send away my MacBook to get fixed, my daughter loaned her laptop to me. I didn't want to go on without PHPStorm, so installed it and had to set it up for Drupal coding standards.

The Drupal.org documentation page Setting up PhpStorm for Drupal's Coding Standards is nice, and still applies to the new versions. Since I just went through that experience, and it is fresh in my mind again, I thought it would be a good time to share more of the good documentation on Drupal.org. - YesCT

Related posts

2014. augusztus 5.

According to our experience the most usual approach for clients with web development needs is to contact multiple agencies with more or less vague ideas - asking for quotes, and then selecting a choice based on price. This approach is doomed to fail for two reasons.