mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix YAML many_many/has_many relationships
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47739 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
144f0fc33e
commit
2a04a0a57b
@ -124,6 +124,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
|||||||
$obj = new $dataClass();
|
$obj = new $dataClass();
|
||||||
foreach($fields as $fieldName => $fieldVal) {
|
foreach($fields as $fieldName => $fieldVal) {
|
||||||
if($obj->many_many($fieldName) || $obj->has_many($fieldName)) {
|
if($obj->many_many($fieldName) || $obj->has_many($fieldName)) {
|
||||||
|
$parsedItems = array();
|
||||||
$items = split(' *, *',trim($fieldVal));
|
$items = split(' *, *',trim($fieldVal));
|
||||||
foreach($items as $item) {
|
foreach($items as $item) {
|
||||||
$parsedItems[] = $this->parseFixtureVal($item);
|
$parsedItems[] = $this->parseFixtureVal($item);
|
||||||
|
Loading…
Reference in New Issue
Block a user