Looks like FixtureFactory can give you the ability to programmatically define values for instances whereas using Injector/DataObject::create() requires manually setting all initial values.

Dynamic generation of fixture data instead of using a static yml file, I think (edited)

You’re saying a new FixtureFactory would be created on each test run?

I’m getting the No injector manifests available error again from trying to create a FixtureFactory in the test class __construct(). I don’t recall why this happens.

Injector::inst()->create(FixtureFactory::class);

Hmmm, the issue went away once I changed the above to public function setUp() { ... }

It’s choking on this Member::create() call:

  1. public static function setUpBeforeClass()
  2. {
  3. Security::setCurrentUser(Member::create([
  4. 'ID' => 1,
  5. 'FirstName' => 'Test',
  6. 'Surname' => 'Person',
  7. ]));
  8. }

It’s choking on calling create() on a TestOnly DataObject