From 2c4803bd42dafd8f77097a8232ad9db8488d8c5b Mon Sep 17 00:00:00 2001 From: Antony Videtta Date: Thu, 23 Jan 2020 15:32:41 +1300 Subject: [PATCH] Missing yml config --- tests/unit/JSONDataFormatterTest.php | 2 +- tests/unit/JSONDataFormatterTest.yml | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/unit/JSONDataFormatterTest.php b/tests/unit/JSONDataFormatterTest.php index 211d667..2016479 100644 --- a/tests/unit/JSONDataFormatterTest.php +++ b/tests/unit/JSONDataFormatterTest.php @@ -31,7 +31,7 @@ class JSONDataFormatterTest extends SapphireTest // Grab test object $formatter = new JSONDataFormatter(); - $parent = $this->objFromFixture(JSONDataFormatterTypeTestObject::class, 'parent'); + $parent = $this->objFromFixture(JSONDataFormatterTypeTestObject::class, 'original'); $json = json_decode($formatter->convertDataObject($parent)); // Returns valid array and isn't null diff --git a/tests/unit/JSONDataFormatterTest.yml b/tests/unit/JSONDataFormatterTest.yml index 38f2b2a..60ad759 100644 --- a/tests/unit/JSONDataFormatterTest.yml +++ b/tests/unit/JSONDataFormatterTest.yml @@ -2,7 +2,26 @@ SilverStripe\RestfulServer\Tests\Stubs\JSONDataFormatterTypeTestObject: foo: ID: 8 Name: Test Object 1 - parent: + original: ID: 9 Name: Test Object Children: =>SilverStripe\RestfulServer\Tests\Stubs\JSONDataFormatterTypeTestObject.foo + parent: + Name: Parent + Active: true + Sort: 17 + Average: 1.2345 + child1: + Name: Child 1 + Active: 1 + Sort: 4 + Average: 6.78 + Parent: =>SilverStripe\RestfulServer\Tests\Stubs\JSONDataFormatterTypeTestObject.parent + child2: + Name: Child 2 + Active: false + Sort: 9 + Average: 1 + Parent: =>SilverStripe\RestfulServer\Tests\Stubs\JSONDataFormatterTypeTestObject.parent + child3: + Parent: =>SilverStripe\RestfulServer\Tests\Stubs\JSONDataFormatterTypeTestObject.parent