Coder Social home page Coder Social logo

Comments (5)

alexislefebvre avatar alexislefebvre commented on May 23, 2024

Maybe having an event when each fixture file is loaded?

I would prefer this option, I'm not fond of callback methods (it requires to inject the test class in the class that load the fixtures).

We may define events like in FOSUserBundle: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/8bb87890cbd872c870f7bd146922906f6e8ddf5c/FOSUserEvents.php#L26

from liiptestfixturesbundle.

darthf1 avatar darthf1 commented on May 23, 2024

I'm looking for something similar. I have two use cases:

  • After the fixtures have been loaded, I would like to populate my Elasticsearch index
  • After the fixtures have been loaded, the ES index is auto populated via an event. I need to call a specific refresh on each Index so the documents are visible during the test.

Would it not be easiest to add a callback function in the FixturesTrait like you have for e.g. postFixtureSetup and postReferenceSave?

from liiptestfixturesbundle.

alexislefebvre avatar alexislefebvre commented on May 23, 2024

I'm trying to add events in #81. Once it will work, it will be easier to add events wherever we want.

from liiptestfixturesbundle.

alexislefebvre avatar alexislefebvre commented on May 23, 2024

@magnetik

I need the reference repository because the redis keys depends on the ID that are loaded.

Could you inject it in a service or you need the instance of this repository?

from liiptestfixturesbundle.

alexislefebvre avatar alexislefebvre commented on May 23, 2024

It should be possible with #81, if not, it will be easy to add events now.

from liiptestfixturesbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.