The more tests that are written the more duplicate code I seem to be encountering, the problem is to insert some data usually relies on a foreign key constraint so each test suite first relies on a user being created, then a twitter user, then an account, etc which takes up a lot of code and adds "noise" to the file.
I propose a test harness class that has methods like "create user", "create account", etc, has a dummy user that can be used in the current test and tear-down methods when the test is complete.
The more tests that are written the more duplicate code I seem to be encountering, the problem is to insert some data usually relies on a foreign key constraint so each test suite first relies on a user being created, then a twitter user, then an account, etc which takes up a lot of code and adds "noise" to the file.
I propose a test harness class that has methods like "create user", "create account", etc, has a dummy user that can be used in the current test and tear-down methods when the test is complete.