Message of the day:
Making TDD easy in SilverStripe
Discuss testing in SilverStripe
cause the tests are not needed on your production server...
it was silverstripe-assets, sorry. Tests are stripped in the releases, you need to install from source
yeah 🤦 Just checking the repo now
https://github.com/silverstripe/silverstripe-assets/blob/1/tests/php/FileTest.php#L43-L52 creates the file from string
Thanks, that’s what I thought regarding AssetAdmin, but could only file behat tests in my install. I’ll have a poke around. 😉
well, it should be OK to mimik the database. Also in assetadmin there should be tests with dataobjects with a relation to files you can use as a blueprint
Or maybe that just isn’t the way to go about it?
I want to check a path (url) that would be returned under certain circumstances, when a file is associated and when one isn’t
has_one be managed via a fixture file, or would there have to be some actual files available somewhere that can be referenced during tests?