From 07c6557fc5f2069dcf5d5ee72aaa323657e64069 Mon Sep 17 00:00:00 2001 From: Bez Hermoso Date: Mon, 28 Jul 2014 14:43:16 -0700 Subject: [PATCH] Test fixes. --- Tests/Formatter/MarkdownFormatterTest.php | 16 +++++++++ Tests/Formatter/SimpleFormatterTest.php | 40 +++++++++++++++++++++-- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/Tests/Formatter/MarkdownFormatterTest.php b/Tests/Formatter/MarkdownFormatterTest.php index f8cf2b4..b49d6a3 100644 --- a/Tests/Formatter/MarkdownFormatterTest.php +++ b/Tests/Formatter/MarkdownFormatterTest.php @@ -762,6 +762,14 @@ related: * type: object (Test) +related[a]: + + * type: string + +related[b]: + + * type: DateTime + ### `ANY` /z-return-selected-parsers-input ### @@ -819,6 +827,14 @@ number: related: * type: object (Test) + +related[a]: + + * type: string + +related[b]: + + * type: DateTime MARKDOWN; $this->assertEquals($expected, $result); diff --git a/Tests/Formatter/SimpleFormatterTest.php b/Tests/Formatter/SimpleFormatterTest.php index f174015..31abd0b 100644 --- a/Tests/Formatter/SimpleFormatterTest.php +++ b/Tests/Formatter/SimpleFormatterTest.php @@ -1080,7 +1080,25 @@ With multiple lines.', 'description' => '', 'sinceVersion' => null, 'untilVersion' => null, - 'children' => array(), + 'children' => array( + 'a' => array( + 'dataType' => 'string', + 'actualType' => DataTypes::STRING, + 'subType' => null, + 'default' => 'nelmio', + 'format' => '{length: min: foo}, {not blank}', + 'required' => true, + 'readonly' => null + ), + 'b' => array( + 'dataType' => 'DateTime', + 'actualType' => DataTypes::DATETIME, + 'subType' => null, + 'default' => null, + 'required' => null, + 'readonly' => null + ) + ), ) ), 'authenticationRoles' => array(), @@ -1197,7 +1215,25 @@ With multiple lines.', 'description' => '', 'sinceVersion' => null, 'untilVersion' => null, - 'children' => array(), + 'children' => array( + 'a' => array( + 'dataType' => 'string', + 'actualType' => DataTypes::STRING, + 'subType' => null, + 'default' => 'nelmio', + 'format' => '{length: min: foo}, {not blank}', + 'required' => true, + 'readonly' => null + ), + 'b' => array( + 'dataType' => 'DateTime', + 'actualType' => DataTypes::DATETIME, + 'subType' => null, + 'default' => null, + 'required' => null, + 'readonly' => null + ) + ), ) ), 'authenticationRoles' => array(),