? Success

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
2 Oct 2016

Regardless of what we do with JView, we should finally remove the deprecated code from JViewLegacy, that has been sitting there deprecated since 1.6...

avatar Hackwar Hackwar - open - 2 Oct 2016
avatar Hackwar Hackwar - change - 2 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Oct 2016
Category Front End Components Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 2 Oct 2016
Labels Added: ?
avatar Hackwar
Hackwar - comment - 2 Oct 2016

I've decided to move the JView* classes from /libraries/legacy to /libraries/cms, too.

avatar Hackwar
Hackwar - comment - 2 Oct 2016

I have no idea why the JApplicationWeb tests now fail with this latest change. (moving the tests into the other folder.)

avatar mbabker
mbabker - comment - 2 Oct 2016

My guess is something in the moved tests that changes global state and doesn't reset things. A far too common problem with our test suite.

avatar mbabker
mbabker - comment - 2 Oct 2016

https://github.com/Hackwar/joomla-cms/blob/4d629f86c8715fd9760cbdb48cd9147f0f0ccb11/tests/unit/suites/libraries/cms/view/JViewLegacyTest.php#L429-L431

Probably those lines. Instead of restoring the state of $_SERVER after the test it's just setting the values if not previously set.

avatar Hackwar
Hackwar - comment - 2 Oct 2016

Funny, the issue is JPATH_COMPONENT. If it is defined, it fails, if it is not, the JApplicationWeb works fine. Of course JViewLegacy then fails spectacularly... I have no idea what is depending on JPATH_COMPONENT not being defined.

avatar mbabker
mbabker - comment - 2 Oct 2016

JViewLegacy only needs JPATH_COMPONENT if it's instantiated without a base_path parameter in the config array. So change the tests to inject that and you can get around needing the constant?

avatar Hackwar
Hackwar - comment - 2 Oct 2016

Unfortunately doesn't work. It seems as if it is not the issue of the JPATH_COMPONENT constant, but something that is executed in the tests afterwards. I simply commented out the define() for JPATH_COMPONENT and that threw a bunch of errors and actually stopped the JViewLegacy tests. Now I've rewritten those and don't get the JPATH_COMPONENT errors, but get the other 2 failures again.

avatar Hackwar
Hackwar - comment - 2 Oct 2016

Found the issue. JUri::base() throws this of...

avatar Hackwar
Hackwar - comment - 2 Oct 2016

Fixed it. JUri::reset() in tearDown() fixes this.

avatar wilsonge
wilsonge - comment - 3 Oct 2016

For those unit tests fixes can we put them into staging? Because that's just good practice anyhow. I'm happy to merge a PR with just those changes in on review

avatar Hackwar
Hackwar - comment - 3 Oct 2016

The unittests in 3.7 are somehow funky, so to be honest, I don't really want to mess around there...

avatar wilsonge
wilsonge - comment - 3 Oct 2016

It's fine. I just directly cherry-picked it into staging :p 0724b0d

avatar wilsonge
wilsonge - comment - 3 Oct 2016

I've also done a PR for the newsfeed change to staging #12296

I'm trying to keep things in sync as best I can for my sanity in the future when i'm solving conflicts xD

avatar mbabker
mbabker - comment - 3 Oct 2016

Then you shoulda started from the 3.7 branch. My office will have a drink
in memory of your sanity when you have to merge that.

On Monday, October 3, 2016, George Wilson notifications@github.com wrote:

I've also done a PR for the newsfeed change to staging #12296
#12296

I'm trying to keep things in sync as best I can for my sanity in the
future when i'm solving conflicts xD


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#12263 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWfofZY6ocLwj3Go8cPlbzRhXPa-ezrks5qwYSOgaJpZM4KMEMm
.

avatar wilsonge wilsonge - change - 4 Oct 2016
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-10-04 20:44:32
Closed_By wilsonge
avatar wilsonge wilsonge - close - 4 Oct 2016
avatar wilsonge wilsonge - merge - 4 Oct 2016

Add a Comment

Login with GitHub to post a comment