Dynamic fixtures

YII 2 and dynamic fixtures

I have one method in console script, which I want to test. It method set date start and date finish.

Date depends of dates in two tables(table1 and table2).

I have follow ways to test:

-empty table1 and empty table2

-empty table1 and not empty table2

-not empty table1 and empty table2

-not empty table1 and not empty table2

-last date in table1 more then last date in table2

-last date in table1 less then last date in table2

How can I test it?

What I think about it:

I need use different fixtures.

I need 6 tests in one TestCase, but how can I reload fixtures for each test?

I think, in method setUp, check, what test is running, overwrite method


fixture() 

and after сall


parent:setUp()

Is it true way?