Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

It's time to add some test for the installer itself #48

Merged
merged 15 commits into from
Dec 21, 2015
Merged

It's time to add some test for the installer itself #48

merged 15 commits into from
Dec 21, 2015

Conversation

geerteltink
Copy link
Member

It tests:

  • configuation
  • containers
  • routers
  • template renderers
  • the homepage action for each test where possible

@geerteltink geerteltink mentioned this pull request Dec 18, 2015
@weierophinney weierophinney added this to the 1.0.0rc5 milestone Dec 21, 2015
@weierophinney weierophinney self-assigned this Dec 21, 2015
@@ -42,27 +42,27 @@ class OptionalPackages
/**
* @var array
*/
private static $config;
public static $config;
Copy link
Member

Choose a reason for hiding this comment

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

Why public?

If it's for testing, the various assertAttribute*() assertions can do assertions on non-public properties. That said, I've not tried on static properties; if those present an issue, I'd argue reflection is still a better way to test these.

Copy link
Member Author

Choose a reason for hiding this comment

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

Those are not being tested. They are public so I can set them from within a test. Doing it this way I don't need to repeat the code to setup the OptionalPackages class.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Couldn't these assignments be done with the Reflection API instead? That way we protect encapsulation for normal consumption.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure how this would work with static classes.

weierophinney added a commit to weierophinney/zend-expressive-skeleton that referenced this pull request Dec 21, 2015
…-tests

It's time to add some test for the installer itself
@weierophinney weierophinney merged commit 1038862 into zendframework:master Dec 21, 2015
weierophinney added a commit that referenced this pull request Dec 21, 2015
It's time to add some test for the installer itself
weierophinney added a commit that referenced this pull request Dec 21, 2015
weierophinney added a commit that referenced this pull request Dec 21, 2015
weierophinney added a commit that referenced this pull request Dec 21, 2015
@geerteltink geerteltink deleted the feature/installer-tests branch December 21, 2015 20:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants