Ph3nol / NotificationPusher

Standalone PHP library for easy devices notifications push.
MIT License
1.18k stars 273 forks source link

[Proposal] Change testing framework back to PHPUnit #158

Open seyfer opened 7 years ago

seyfer commented 7 years ago

In my opinion use of Autom test framework doesn't add any benefit to the library and even creates some inconvenience. Why? Because PHPUnit is de facto standard for testing in PHP world. And most of the developers know PHPUnit and only a few enthusiasts know Atoum. This leads to a situation when some contributor wants to add some code to the library, he is much less likely to write a test with his pull request. Because most of the potential contributors don't know Atoum, it adds unnecessary learning curvy and actually prevents people from writing tests with their contributions.

To make my point stronger, I will provide a link with libraries popularity and activity comparison. https://php.libhunt.com/project/atoum/vs/phpunit And here is a story about the negative experience with Atoum and returning to PHPUnit http://technosophos.com/2012/01/25/atoum-different-unit-testing-framework-php.html

I would like to read thoughts from other contributors and from the author @Ph3nol. If everyone agrees, I would start a new branch for a migration process to PHPUnit.

btry commented 6 years ago

Hi

The story you shared is not very relevant. I use Atoum for some projects, and have sometimes race conditions between tests like the author described.

The author missed to tell that Atoum is designed to run tests in a test class in parallel, by running several PHP processes. Maybe he was not aware of the available solutions, or maybe they were not implemented at time of writing (2012). If you have some race conditions, I think this is interesting to know because this might be an opportunity to rewrite some parts of the project or its tests in a better way. If for some reason you cannot avoid such race condition you can:

I switched from PHPUnit to Atoum and I found tests really more easy to write mostly because in Atoum there is no need to mess with static methods to setup the test class or a test method.

You may have a look on this feedback:

https://glpi-project.org/glpi-now-uses-atoum-for-its-unit-tests-2/