Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
ajax system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Oct 2014 at 00:13 UTC
Updated:
15 Nov 2014 at 14:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mile23Le patch.
Just changes @coversDefaultClass and @covers, plus function summary docs where appropriate.
Comment #2
mile23Comment #3
yesct commentedI read the patch, read the tests, and the changes saying they are covering ::content seem reasonable.
I also checked out the commit hash from after #2364127: Merge AjaxResponseRenderer into AjaxController when those lines were added, and there is no methods renderContentIntoResponse or renderMainContent then (or now). so clearly the comments were wrong.
in general, to run test coverage, make sure xdebug is on, (maybe edit a php.ini and restart apache)
then
cd core
./vendor/phpunit/phpunit/phpunit --filter=AjaxControllerTest --coverage-html /tmp/report
before the patch, on head:
Trying to @cover or @use not existing method "\Drupal\Core\Controller\AjaxController::renderContentIntoResponse".after the patch:
it gets further:
(but after 9 minutes did not get to "done" and the report generated. but that might not be a problem with this patch and due to something else)
[edit: it took 10 minutes and did finish. :)]
I cant think of anything to improve this patch. so rtbc.
Comment #4
yesct commentedthe coverage report:
Comment #5
mile23Thanks for the review.
The proof is in the pudding... The tests only call
content(), so therefore they can only @cover that method. eg:Also: Report generation can take a while for HTML, but you can also verify that it works correctly with
--coverage-text. It's quicker, will fail on the same errors, and will show you abbreviated results in the console.Comment #6
wim leersMy bad.
Patch looks good!
Comment #7
yesct commented@Mile23 oh, thanks for the hint about leaving off the html to speed that up.
Comment #8
alexpottThis issue is an improvement to automated testing and there is unfrozen as per #2350615: [policy, no patch] What changes can be accepted during the Drupal 8 beta phase?. Committed 211fd40 and pushed to 8.0.x. Thanks!