Skip to content

Add tests for the CachedResourceNameCollectionFactory class #828

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

Conversation

meyerbaptiste
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

} catch (CacheException $e) {
// do nothing
}
$cacheItem->set($resourceNameCollection);
Copy link
Member Author

@meyerbaptiste meyerbaptiste Nov 4, 2016

Choose a reason for hiding this comment

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

IMHO there is no reason to catch a CacheException exception here because CacheItemPoolInterface::save() and CacheItemInterface::set() methods are not planning to throw an exception in their method definitions.

@meyerbaptiste meyerbaptiste changed the title Add tests for the CachedResourceNameCollectionFactoryTest class Add tests for the CachedResourceNameCollectionFactory class Nov 4, 2016
@meyerbaptiste meyerbaptiste force-pushed the add_tests_cached_resource_name_collection_factory branch 2 times, most recently from 8c475f3 to 340345b Compare November 4, 2016 22:13
@meyerbaptiste meyerbaptiste force-pushed the add_tests_cached_resource_name_collection_factory branch from 340345b to 3940dc4 Compare November 5, 2016 09:32
@dunglas dunglas merged commit f26fa06 into api-platform:master Nov 6, 2016
@dunglas
Copy link
Member

dunglas commented Nov 6, 2016

Thanks @meyerbaptiste

@teohhanhui
Copy link
Contributor

We should do the same for all the other cached factories then.

@meyerbaptiste meyerbaptiste deleted the add_tests_cached_resource_name_collection_factory branch November 9, 2016 15:37
magarzon pushed a commit to magarzon/core that referenced this pull request Feb 12, 2017
…ed_resource_name_collection_factory

Add tests for the CachedResourceNameCollectionFactory class
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.

3 participants