diff --git a/Tests/Fixtures/Form/TestType.php b/Tests/Fixtures/Form/TestType.php index 2b3f053..65ec99b 100644 --- a/Tests/Fixtures/Form/TestType.php +++ b/Tests/Fixtures/Form/TestType.php @@ -43,6 +43,6 @@ class TestType extends AbstractType public function getName() { - return 'test_type'; + return ''; } } diff --git a/Tests/Formatter/MarkdownFormatterTest.php b/Tests/Formatter/MarkdownFormatterTest.php index 12da9a5..65d4571 100644 --- a/Tests/Formatter/MarkdownFormatterTest.php +++ b/Tests/Formatter/MarkdownFormatterTest.php @@ -81,18 +81,18 @@ _create test_ #### Parameters #### -test_type[a]: +a: * type: string * required: true * description: A nice description -test_type[b]: +b: * type: string * required: false -test_type[c]: +c: * type: boolean * required: true @@ -109,18 +109,18 @@ _create test_ #### Parameters #### -test_type[a]: +a: * type: string * required: true * description: A nice description -test_type[b]: +b: * type: string * required: false -test_type[c]: +c: * type: boolean * required: true diff --git a/Tests/Formatter/SimpleFormatterTest.php b/Tests/Formatter/SimpleFormatterTest.php index 603a05e..6eba5a1 100644 --- a/Tests/Formatter/SimpleFormatterTest.php +++ b/Tests/Formatter/SimpleFormatterTest.php @@ -104,22 +104,19 @@ class SimpleFormatterTest extends WebTestCase 'description' => 'create test', 'parameters' => array( - 'test_type[a]' => - array( + 'a' => array( 'dataType' => 'string', 'required' => true, 'description' => 'A nice description', 'readonly' => false, ), - 'test_type[b]' => - array( + 'b' => array( 'dataType' => 'string', 'required' => false, 'description' => '', 'readonly' => false, ), - 'test_type[c]' => - array( + 'c' => array( 'dataType' => 'boolean', 'required' => true, 'description' => '', @@ -147,22 +144,19 @@ class SimpleFormatterTest extends WebTestCase 'description' => 'create test', 'parameters' => array( - 'test_type[a]' => - array( + 'a' => array( 'dataType' => 'string', 'required' => true, 'description' => 'A nice description', 'readonly' => false, ), - 'test_type[b]' => - array( + 'b' => array( 'dataType' => 'string', 'required' => false, 'description' => '', 'readonly' => false, ), - 'test_type[c]' => - array( + 'c' => array( 'dataType' => 'boolean', 'required' => true, 'description' => '', diff --git a/Tests/Parser/FormTypeParserTest.php b/Tests/Parser/FormTypeParserTest.php index 5c6f98a..7efab24 100644 --- a/Tests/Parser/FormTypeParserTest.php +++ b/Tests/Parser/FormTypeParserTest.php @@ -32,38 +32,45 @@ class FormTypeParserTest extends \PHPUnit_Framework_TestCase public function dataTestParse() { return array( - array('Nelmio\ApiDocBundle\Tests\Fixtures\Form\TestType', array( - 'a' => array( - 'dataType' => 'string', - 'required' => true, - 'description' => 'A nice description', - 'readonly' => false - ), - 'b' => array( - 'dataType' => 'string', - 'required' => true, - 'description' => '', - 'readonly' => false - ), - 'c' => array( - 'dataType' => 'boolean', - 'required' => true, - 'description' => '', - 'readonly' => false - )) + array( + array('class' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Form\TestType'), + array( + 'a' => array( + 'dataType' => 'string', + 'required' => true, + 'description' => 'A nice description', + 'readonly' => false + ), + 'b' => array( + 'dataType' => 'string', + 'required' => true, + 'description' => '', + 'readonly' => false + ), + 'c' => array( + 'dataType' => 'boolean', + 'required' => true, + 'description' => '', + 'readonly' => false + ) + ) ), - array('Nelmio\ApiDocBundle\Tests\Fixtures\Form\CollectionType', array( - 'a' => array( - 'dataType' => 'array of strings', - 'required' => true, - 'description' => '', - 'readonly' => false - ), 'b' => array( - 'dataType' => 'string', - 'required' => true, - 'description' => '', - 'readonly' => false - )) + array( + array('class' => 'Nelmio\ApiDocBundle\Tests\Fixtures\Form\CollectionType'), + array( + 'collection_type[a]' => array( + 'dataType' => 'array of strings', + 'required' => true, + 'description' => '', + 'readonly' => false + ), + 'collection_type[b]' => array( + 'dataType' => 'string', + 'required' => true, + 'description' => '', + 'readonly' => false + ) + ) ), ); }