Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Jul 2013 at 21:03 UTC
Updated:
29 Jul 2014 at 22:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yesct commentedcoverage of Settings, example:

It does not have it's own tests, which I would guessed would be in:
core/tests/Drupal/Tests/Component/Utility/Settings.php
I'm not sure how to generate an easily cut and pasted list of tests that are providing test coverage.
I can see the list when hover, but not copy the list.
Also, since the goal is to make things unit testable, and this seems like it already is, I'm not sure if expanding the test coverage is what we want to be doing.
If so though, would we make new tests in
core/tests/Drupal/Tests/Component/Utility/Settings.php
or look at the tests already covering some of this and add some tests there?
Comment #2
jhedstromHere's a first attempt at adding unit tests specific to this component.
Comment #3
jhedstromHere's a first attempt at adding unit tests specific to the settings component.
Comment #4
dawehnerNice!
Maybe a small assertion message would help.
Aside from that you could also test getAll()
Comment #5
dawehnerComment #6
jhedstromI added messages, and moved each method into a separate test. This has 100% coverage of Settings class.
Comment #7
dawehnerNice! Thank you very much.
Comment #8
catchCommitted/pushed to 8.x, thanks!
Comment #10
jhedstrom