OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions How to create a test entity?

This topic contains 3 replies, has 2 voices, and was last updated by  Yevhen Shyshkin 8 years ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #36216

    Paul Stoica
    Participant

    Hi,

    How to create a new configurable test entity wich contains also a table in the test database, also this entity will be available only in test mode?

    Is this possible, or is a way to do that?

    Thank you in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #36217

    Yevhen Shyshkin
    Participant

    Hello.

    The easiest way to do that is to create bundle with migrations and register it only in test environment – this is exactly how OroTestFrameworkBundle works.

    #36218

    Paul Stoica
    Participant

    I see,

    I thought that is a way: how datafixtures are loaded; inside the Tests folder(as Migrations), and there to be all my Migrations with versions. I think it will be a good improvement in future, to create your own test Entities and Migrations and to be loaded only in test environment(It’s only my opinion).

    Thank you.

    #36219

    Yevhen Shyshkin
    Participant

    Thank you for good idea. Probably, we’ll use this approach when we’ll need a lot of test entities.

Viewing 3 replies - 1 through 3 (of 3 total)

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top