'PHP TDD asserts by comparing data of two json files

I've started working with TDD and I looking to take the correct way. In most cases, I have to test simple methods that take an array as input and return an array as output, sometimes with large numbers of variables (for example 20). So I've discovered that it's handy to keep input and output data for a test as separate json files, so for testing 1 method with multiple cases, I can have up to 4-10 json files. And then just pass the json names for input and output with the data provider.

But I see that I collect so many json files for a few tests and I'm afraid that when I will get covered all backend with tests this way, my IDE will crash because of json files amount.

So am I right? Or this is a good way for TDD? Is there a better way to handle similar cases?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source