Problem/Motivation
Follow-up to #2332739: Remove SortArray::sortByWeightAndTitle
that got tricky trying to expand the coverage to ConfigurableLanguages (which implement the LanguageInterface)
and the test was kind of in the wrong place since it is in the core component area and ConfigurableLanguages are in language module.
Proposed resolution
add a test in language module to show that an array of languages which includes ConfigurableLanguages will sort ok.
Remaining tasks
try it
User interface changes
no
API changes
no
Comment | File | Size | Author |
---|---|---|---|
#1 | 2334483.1.patch | 3.79 KB | YesCT |
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedhm.
sort() is not defined on the LanugageInterface ...
maybe we mean it to be if we are going to be calling Language::sort() on things that extend LanguageInterface (and not Language).
(doesn't yet have the entitymanager mock, but we can add that back in.)
Comment #3
alexpottThis
There is no sort method on ConfigurableLanguage so this is incorrect. I think we need a whole new PHPUnit test for this in the language module since we're testing the integration between the Language and Configurable language classes.
I think we should remove all usages of the setters. I've created an issue to remove all setters from the LanguageInterface see #2334763: Tidy up of LanguageInterface - removal of setters and other unnecessary methods for more.
Comment #10
apaderno