container icon indicating copy to clipboard operation
container copied to clipboard

Have Dummy/Test Container for testing purposes?

Open gmponos opened this issue 8 years ago • 2 comments

PSR Logger has a Null Logger which can be used easily for testing purposes.

Is there any thought about creating a Dummy/Test/Null container for the same reasons?

gmponos avatar Jun 26 '17 14:06 gmponos

I believe that starting with PSR6+, the decision has been made not to add any implementations to the PSR packages.

Instead, a "psr/xxx-util" package is proposed for common utility classes. For instance: https://github.com/php-fig/cache-util

We could definitely use such a package, although I don't know what could be put in it apart from a Dummy container (maybe EmptyContainer would be a better naming). Maybe a CompositeContainer?

moufmouf avatar Jun 27 '17 08:06 moufmouf

Hello,

I haven't seen any related package being created since the report of these issue (although it's not so old issue). But because there was a need in my projects I have started creating various DummyContainers in here and there order to do some tests . So I decided instead to create this package:

https://github.com/webthinkgr/psr-test-container

If you like it I am willing to make any necessary to be compatible with PSR (like namespaces etc) and transfer it if you wish.

gmponos avatar Aug 03 '17 19:08 gmponos