mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
FIX: adding caller class parameter to DataObject get
This commit is contained in:
parent
76145df1ae
commit
13271a8a6d
@ -258,7 +258,7 @@ class FixtureContext extends BehatContext
|
|||||||
else $field = "ID";
|
else $field = "ID";
|
||||||
|
|
||||||
// Check if the fixture object exists - if not, we create it
|
// Check if the fixture object exists - if not, we create it
|
||||||
$obj = \DataObject::get()->filter($field, $value)->first();
|
$obj = \DataObject::get($class)->filter($field, $value)->first();
|
||||||
if(!$obj) $obj = $this->fixtureFactory->createObject($class, $value);
|
if(!$obj) $obj = $this->fixtureFactory->createObject($class, $value);
|
||||||
// If has_many or many_many, add this fixture object to the relation object
|
// If has_many or many_many, add this fixture object to the relation object
|
||||||
// If has_one, set value to the joint field with this fixture object's ID
|
// If has_one, set value to the joint field with this fixture object's ID
|
||||||
|
Loading…
Reference in New Issue
Block a user