We’ve got a lot of “model” classes which all extends Entity. When in controller classes/methods we want to get multiple objects of one model we do Model::find()->where()->orderby()->etc… find() as shown returns an object where we can filter out our objects and then retrieve them.
We want to make tests for our codebase but I’m thinking testing the controllers will be hard because we access the models using a static method directly on the concrete model classes.
If we just want to create a new model we do $model = new Model(); $model->property = “value”; $model->save(); so that is probably a lot more testable if we change to using a dependency injection tool like Phemto.