Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Testing a DataModel


Go to End


2 Posts   635 Views

Avatar
AndrewLowther

Community Member, 3 Posts

3 August 2013 at 11:46pm

I've started writing a new module to use in SS 3.1.x, and I'm now at the point where I'm starting to test various bits of functionality, however I'm running into a problem, when trying to test the "new" screen in my module, I'm receiving an error where it says Undefined property: MediaItem::$CloudinaryRef. Here are links to the model itself and the test results:

https://github.com/AndrewLowther/mediamanager/blob/master/core/code/models/MediaItem.php

https://travis-ci.org/AndrewLowther/mediamanager/jobs/9804419

It seems to only be on travis that this is a problem, and I've been trying to resolve it for the last day or so, with no luck.

Thanks.

Avatar
AndrewLowther

Community Member, 3 Posts

4 August 2013 at 9:02am

Figured out what was going wrong here, exactly the same issue as on this thread http://www.silverstripe.org/data-model-questions/show/24659

The getters and setters accessing the value directly were causing it to break.