Yii Framework Forum: Automated testing and fixtures - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Automated testing and fixtures

#1 User is offline   ad_amin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-October 16

Posted 21 September 2017 - 05:14 AM

Hi all,

I'm having a bit of a trouble with automated tests implementation.

I'm specifying fixtures within _fixtures() method for every test suite I build. It's all fine when I run each test suite separately. When I run them all at once the _fixtures() method gets called only for the first test suite and therefore subsequent tests fail because of their data missing.

I'm aware that I can call haveFixtures() method - I would like to avoid that though and have the fixtures loaded automatically before each test suite no matter if I run them on their own all in a bunch.

This feels like an inconsistency/bug to me - am I missing something here? If this is by design, how can I workaround it in the most clean way possible?

Thanks!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users