FriendsOfCake / fixturize

CakePHP: Improve performance of your fixture based tests on MySQL.
MIT License
24 stars 14 forks source link

[1.x] feat: TableKey takes into account the class name #29

Closed krugerman007 closed 1 month ago

krugerman007 commented 1 month ago

Same as https://github.com/FriendsOfCake/fixturize/pull/28, but for 1.x version.

--

We have the problem that you cannot load 2 fixtures for one table one after the other. For example:

The last fixture is not applied because the hash was not changed. And the plugin only checks the hash of the table by connection and table name. The plugin does not take into account the class name of fixtures.

ravage84 commented 1 month ago

@krugerman007 could you please show two examples of such hashes?

May be a var_export()/debug() outputs or screenshots of the variable while debugging.

krugerman007 commented 1 month ago

@krugerman007 could you please show two examples of such hashes?

  • One with a regularly named fixture file
  • One with a blank or irregularly named fixture file

May be a var_export()/debug() outputs or screenshots of the variable while debugging.

Sure:

2024-08-09 11_11_22

I have also started our tests with this fix: it works now very fast: 2 times faster! From 5 min 39 sec to 3 min 32 sec loca :)

2024-08-09 12_10_51