
Updated: Comment 0
Problem/Motivation
Proposed resolution
Remaining tasks
User interface changes
API changes
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#8 | 2121855-8.patch | 36.38 KB | damiankloip |
#8 | interdiff-2121855-8.txt | 7.26 KB | damiankloip |
#6 | vdc-2121855-6.patch | 33.19 KB | tim.plunkett |
#6 | interdiff.txt | 566 bytes | tim.plunkett |
#5 | interdiff.txt | 2.3 KB | tim.plunkett |
Comments
Comment #1
dawehner.
Comment #2
damiankloip CreditAttribution: damiankloip commentedMaybe just 'The mocked module handler'.
s/$the/The - unless you know something I don't about using variables in docs.. ;)
I *think* we put {@inheritdoc} here now?
@see ?
We can use assertCount() here instead.
Do you think we should make these array comparison ones assertSame() ?
assertArrayHasKey() can be used here.
Comment #3
dawehnerThank you for the review!!
Comment #4
dawehner.
Comment #5
tim.plunkettI noticed that the coverage for fetchBaseTables() was incomplete, and realized that the test data was declaring the weight wrong. I decided to expand it to test all paths of the sort.
In addition, I think we've actually proven that the "If the key is invalid, return an empty array." case is unreachable code.
I cannot figure out how to arrive at that line. Either it is populated via cache, or we have
$this->storage[$key] = array();
.Yay unit tests leading to removing dead code!
Comment #6
tim.plunkettActually, I meant take that one step further.
Comment #7
dawehnerOh yeah I was worried that I could not test that line.
Comment #8
damiankloip CreditAttribution: damiankloip commentedSorry to add another chef to the kitchen here, but I really couldn't be bothered to write this down, easier to just do it. Probably same as Tim above :)
I think we should setup the mock expectations for the cache backend in some of the other test methods, as they cover cases that are not covered below by the warmCache* methods. Like calling get(), then get($table_name), then get($random_table_name).
Oh, and brought back the -50 weight, so the fetchTables gets testing with a lower and higher weight, as well as a lower/higher title. So that should exercise the sorting.
Comment #9
dawehnerGreat improvements!
Comment #10
webchickCommitted and pushed to 8.x. Thanks!