Skip to content

add discovery functional tests when discovery is forced or disabled #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2017
Merged

add discovery functional tests when discovery is forced or disabled #184

merged 1 commit into from
Jul 7, 2017

Conversation

fbourigault
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets related to #183
Documentation n/a
License MIT

This add more tests related to discovery and will help to get #183 refactoring safe.

@fbourigault fbourigault requested a review from Nyholm July 7, 2017 13:37
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
if ($this->isDebug()) {
$loader->load(__DIR__.'/config/config_debug.yml');
}
Copy link
Member

Choose a reason for hiding this comment

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

else {
//load config/config.yml
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

config.yml have been renamed to config_test.yml to always have a configuration file matching the current environment.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Just want to confirm..

$container = $this->getContainer(true, 'discovery_forced');

$this->assertFalse($container->has('httplug.auto_discovery.auto_discovered_client'));
$this->assertFalse($container->has('httplug.auto_discovery.auto_discovered_async'));
Copy link
Member

Choose a reason for hiding this comment

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

Should these be false on both testDisabledDiscovery and testForcedDiscovery?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, when forced, we use the service id provided by the user. IMHO, those services shouldn't be public as we use them as httplug.discovery arguments.

@Nyholm Nyholm merged commit f507c1a into php-http:master Jul 7, 2017
@fbourigault fbourigault deleted the discovery-forced-disabled-tests branch July 7, 2017 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants