I am fairly a beginner in Laravel and I have created a custom command like 'exceldata:import'
that imports data from the Excel file, turn it into suitable format and store in the database.
The flow works as follows:
Command Class --> Excel Import Class --> Model Service Class --> Model Repository Class
The handle() function in command class calls the methods in Excel Import Class which reads the data from the file and turn into array. The array is sent to methods in repository class where the models are created and stored in the database.
What would be the perfect way to create the test class that would test all the classes are working perfectly?
Aucun commentaire:
Enregistrer un commentaire