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

Fixed incorrect variable usage in MongoDbResourceManager #128

Merged
merged 2 commits into from
Feb 11, 2017
Merged

Fixed incorrect variable usage in MongoDbResourceManager #128

merged 2 commits into from
Feb 11, 2017

Conversation

careys7
Copy link
Contributor

@careys7 careys7 commented Feb 7, 2017

Updated incorrect $this->resource variable usages to $this->resources in MongoDbResourceManager.

@Ocramius
Copy link
Member

Ocramius commented Feb 7, 2017

Tests missing. Specifically: the fact that this didn't affect the build status means that we either:

  • simply don't test it
  • had unknown memory leaks
  • it's dead code, and not relevant at all

Ensures that different collection instance is returned by MongoDbResourceManager::getResource() after changing options.
@careys7
Copy link
Contributor Author

careys7 commented Feb 8, 2017

Updated with tests.

Tests ensure that the instance of MongoCollection held for a given resource id does not persist following method calls to:

  • MongoDbResourceManager::setServer()
  • MongoDbResourceManager::setCollection()
  • MongoDbResourceManager::setConnectionOptions()
  • MongoDbResourceManager::setDriverOptions()
  • MongoDbResourceManager::setDatabase()

@marc-mabe marc-mabe merged commit 8b9f16c into zendframework:master Feb 11, 2017
marc-mabe added a commit that referenced this pull request Feb 11, 2017
@marc-mabe marc-mabe added this to the 2.7.3 milestone Feb 11, 2017
@marc-mabe
Copy link
Member

@careys7 Thanks for the fix! I have modified you test(s) to get batter coverage.

@careys7
Copy link
Contributor Author

careys7 commented Feb 11, 2017

Your tests look better 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants