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:
Andrew O'Neil 2008-01-08 21:32:13 +00:00
parent 144f0fc33e
commit 2a04a0a57b

View File

@ -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);