User tests: Successful: Unsuccessful:
This opens the unit tests to a limit amount of code style fixing. There's lot of exclusions for now, which over time we'll start to fix issues and then open them up.
For now this fails travis but going to work on fixing/excluding the remaining issues
Status | New | ⇒ | Pending |
Category | ⇒ | Repository Unit Tests |
Labels |
Added:
?
?
|
If my head stops pounding this year then perhaps.
Thanks :)
Ping @photodude
Just at a quick glance at https://github.com/wilsonge/joomla-cms/blob/f1e50e99abd215ad44f9863c818d598aa011eaf8/tests/unit/suites/libraries/cms/router/JRouterSiteTest.php#L91 it seems like the sniff fails to account for if the class' arguments are spread across multiple lines. You know PHPCS better than me, any ideas? (Also, does this need to be fixed in your PHPCS 2.x work?)
Off the top of my head I think multiline class instatiation should work in phpcs2.7.x I'll be out for a while today, I'll double check when I get back. The code snip you pointed to will make an easy test case to test against to check if it passes.
@mbabker I have run an isolated code test for the new class instantiation problem against the PHPCS 2.x branch of the Joomla code standard on phpcs 2.7.0 with no issues.
Looking deeper into the sniffs issue here is resulting from a failure in our phpcs1.5.x custom sniff Joomla.Classes.InstantiateNewClasses.New
Off the top of my head I'm not sure if it's an issue with the phpcs1.5.x tokenizer or with our phpcs1.5.x custom sniff.
I have verified it's an issue within our phpcs1.5.x custom sniff Joomla.Classes.InstantiateNewClasses.New
I have a fix from the PHPCS 2.x version.
I'll open a PR shortly to fix the issue
To be a little more specific on the class instantiation issue failure. It would occur when there were cases with the first parameter in a multiline class instantiation was an empty array array()
, true
, false
, or null
The PR I opened for the phpcs 1.5.x sniff fixes those cases so the errors will stop. Please review that PR so we can merge.
Looks like the unit test stubs and the unit test view layouts need to be excluded (they are technically not php files after all)
and the one file tests/unit/suites/plugins/content/emailcloak/PlgContentEmailcloakTest.php
has some comment issues needing to be addressed (another autofixer opportunity)
OK We should be good to go here
I have just rebootet the PHP7 build.
Yay lots of passes
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-07-26 13:35:06 |
Closed_By | ⇒ | mbabker |
@mbabker if you could look into the weird class instantiation errors?