<testsuites>
    <testsuite name="Drupal Unit Test Suite">
      <directory>./tests</directory>
      <directory>./modules/*/tests</directory>
      <directory>../modules</directory>
      <directory>../sites/*/modules</directory>
      <!-- Exclude Composer's vendor directory so we don't run tests there. -->
      <exclude>./vendor</exclude>
      <!-- Exclude Drush tests. -->
      <exclude>./drush/tests</exclude>
      <!-- Exclude special-case files from config's test modules. -->
      <exclude>./modules/config/tests/config_test/src</exclude>
    </testsuite>
  </testsuites>

Themes and profiles are not allowed! phpunit.xml.dist

We should add them and them to the whitelist too (cf #2287385: Fix PHPUnit coverage tests)

CommentFileSizeAuthor
#1 2287925.1.patch1.15 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott’s picture

Status: Active » Needs review
FileSize
1.15 KB

Interesting themes are not in container namespaces so can't have plugins - providing blocks would be something I think they should be able to do. Profiles are in container namespaces.

sun’s picture

themes are not in container namespaces so can't have plugins - providing blocks would be something I think they should be able to do.

There's no agreement on that yet. The original idea for D8 was that themes should be pure templating engines and should not contain functional PHP code beyond that. In any case, that discussion belongs into the related issue.

jhedstrom’s picture

Adding a related issue with some relevant discussion.

It seems to me that, regardless of the 'themes can contain OO/plugins' discussion, that they should be able to register PHPUnit, since procedural functions can still be unit tested.

jhedstrom’s picture

mgifford’s picture

Status: Needs review » Needs work

Needs re-roll.

alexpott’s picture

@jhedstrom how can the procedural functions be unit tested when the code is not autoloaded?

dawehner’s picture

Especially with #474684: Allow themes to declare dependencies on modules we also basically said: complex code for themes should live in modules.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

borisson_’s picture

Status: Needs work » Closed (outdated)

At least the themes part of this was fixed in #2769599: [PP-1] Allow themes to be testable. Profiles are also testable, standard, umami and minimal have tests.

Closing this issue as outdated.