Skip to content

Some improvements in tests #4:#13408

Merged
wilsonge merged 4 commits intojoomla:stagingfrom
frankmayer:improvements-in-tests-4
Dec 30, 2016
Merged

Some improvements in tests #4:#13408
wilsonge merged 4 commits intojoomla:stagingfrom
frankmayer:improvements-in-tests-4

Conversation

@frankmayer
Copy link
Copy Markdown
Contributor

@frankmayer frankmayer commented Dec 29, 2016

Summary of Changes

Some improvements in tests 4:

  • removal of some unused variables (and inserted todos if unclear)
  • removal of null assignments on class properties;

Testing Instructions

Code review only.

Documentation Changes Required

None

- removal of some unused variables (and inserted todo's if unclear)
- removal of null assignments on class properties;
* @return boolean True on success, false otherwise
*
* @since 12.1
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this classes subclasses inherit this method. It needs to be kept I'm pretty sure?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i add that doubt also, but doesn't that came from JCacheStorage class (which this one extends)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wilsonge I noticed that it extends JCacheStorage, which has the identical function. Am I missing something?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should be fine. It's a mock for JCacheStorage, not a test case being extended.

'Line: ' . __LINE__
);

//todo: OK to remove this unused assignment and following assertion? Or is some implementation missing?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove all this. Even if we had the file, assuming it had the correct Spanish data, the test case would fail because the $option array uses English data.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my thinking, too, but I wasn't sure if someone would want to expand and correct this test. Will remove.

*/
public function get($id, $group, $checkTime = true)
{
//todo: OK to remove this unused assignment? Or is some implementation missing?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, it looks like in all cases the generated cache ID isn't being used but the ID passed as a parameter into the methods is. So either fix all of them to use the generated cache ID or just remove the calls.

@wilsonge wilsonge merged commit 57337f7 into joomla:staging Dec 30, 2016
@wilsonge
Copy link
Copy Markdown
Contributor

Awesome - Thanks!

@frankmayer frankmayer deleted the improvements-in-tests-4 branch January 4, 2017 07:15
@zero-24 zero-24 added this to the Joomla 3.7.0 milestone Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants