Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
system.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Apr 2015 at 16:49 UTC
Updated:
22 Apr 2015 at 21:14 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
dawehnerUps :(
Comment #2
willzyx commentedI'm not sure how to write tests that cover all possible cases
Comment #3
dom. commentedHi!
I'm okay with your patch, although I'm not sure of this lign regarding Drupal standards :
$phpversion = $phpversion_label = phpversion();RTBC+1 otherwise.
Regarding tests, I can make a WebBaseTest that would check :
- URL admin/reports/php is accessible as admin
- URL admin/reports/php is not accessible as standard user.
- URL admin/reports shows a link called "more information"
- This link points to admin/reports/php.
Would it be enough ?
Comment #4
willzyx commentedComment #6
andypostGreat! test just need to be cleaned up.
There's docs to disable function https://www.drupal.org/node/243993
And https://www.drupal.org/node/59680 should be updated about this case
There's no reason to split this into different test methods, because each test* method causes fresh install of core for testing.
then try to visit status/php and check responce
Comment #7
willzyx commentedchanges as per #6
Comment #8
willzyx commentedWe should also check if phpinfo() exists in
SystemInfoController::php()since admin/reports/status/php can be reached directly. Opened #2465467: SystemInfoController::php() should check if function phpinfo() existsComment #9
dom. commented- patch is okay regarding Drupal standards
- test manually that patch works and tests properly when phpinfo is activated and when desactivated.
However, I would suggested to add this (just haggling but still) :
- should we add a test that the admin/reports/status/php page is not accessible when unlogged as admin ? I'm not sure if it's interesting because basically it tests the permission key of the .routing.yml file which is not the purpose here !
Also I have created a follow up issue regarding the display of admin/reports/status/php when phpinfo is disabled:
#2465473: Page admin/reports/status/php display blank when phpinfo is disabled
Comment #10
willzyx commentedI think #2465473: Page admin/reports/status/php display blank when phpinfo is disabled is a duplicate of #2465467: SystemInfoController::php() should check if function phpinfo() exists (in which I have already provided a patch).
Comment #11
dom. commentedSorry you wrote your comment #8 while I was doing mine and did not see your issue (no keyword I was looking for gave me results !). I will review it also. Thus this one is RTBC.
Comment #12
dawehnerMoving to system module
Comment #13
alexpottLet's just add this into testStatusPage since it is part of testing that page. Multiple test methods in WebTestBase require a re-install of Drupal and in this case nothing is gained by doing that.
Comment #14
dom. commentedJust rewrited patch for comment #13.
Comment #15
willzyx commentedRTBC + 1
Comment #16
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 6435e2e and pushed to 8.0.x. Thanks!