H
H
HaruAtari2014-04-10 21:41:28
Yii
HaruAtari, 2014-04-10 21:41:28

Phpunit: Fixtures or Transactions?

There is a project on yii. Tests for him. And, as expected, a bunch of fixtures. The fixtures are rather large in size, and are used before each test. Because of this, the tests began to run slowly.
I thought maybe it would be faster before describing a script that will roll the entire database once before the tests, and in setUp () and tearDown () just start and roll back the transaction? DB - postgres.
Seems like there shouldn't be any problems. Tell me, has anyone done this? Are there any pitfalls in this approach?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question