Change non-static class-level variables and methods to static in tests's data providers

The update modifies several test classes within the "chill-project" to change non-static class-level variables and methods to static ones. This change has been made to improve readability, performance, and to eliminate unnecessary instantiation of class objects in test scenarios. Also, flush and clear actions on the entity manager are moved to individual data providers.
This commit is contained in:
2024-02-19 15:38:28 +01:00
parent d0f23eb6b1
commit 0081146a78
11 changed files with 81 additions and 92 deletions

View File

@@ -28,7 +28,7 @@ trait PrepareCenterTrait
/**
* prepare a mocked center, with and id and name given.
*/
protected function prepareCenter(int $id, string $name): Center
protected static function prepareCenter(int $id, string $name): Center
{
$center = new Center();
$center->setName($name);