Discovered as part of #2068471: Normalize Controller/View-listener behavior with a Page object, it looks like none of the pages under admin/reports* is currently tested at all (?!).

We need some tests like:
- Status report shows OK, warning, error messages correctly (create a test module that implements hook_requirements())
- Error report shows notice, warning, etc. errors properly
- 403, 404, etc. reports are showing those errors when they are triggered
- Maybe some other things

Comments

cilefen’s picture

There are 25 tests that load paths in admin/reports from this rough search:

$ grep -rl 'admin/reports' core/  |grep Test |grep -v migrate_drupal |wc -l
      25

I looked into some of these:

  • core//modules/dblog/src/Tests/DbLogTest.php does what it says. It tests quite a lot.
  • core//modules/contact/src/Tests/ContactPersonalTest.php, core//modules/file/src/Tests/SaveUploadTest.php, do nice little tests on formatted log messages.
  • core//modules/system/src/Tests/System/StatusTest.php tests admin/reports/status.

So things may have changed since this issue was opened. I am sure we could target some specifics but maybe we need a new title.

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.

dagmar’s picture

Status: Active » Fixed

As part of #2015149: Replace dblog recent log entries with a view it seems there are already a lot of tests in core/modules/dblog/src/Tests/DbLogTest.php.

I agree with @cilefen. I'm closing this issue as Fixed. If there is another test to write, please create a new issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.