mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-03-10 09:36:10 +03:00
Fix tests
Related to 43b8f898455b103f03752b544c828d98fb3f3f49
This commit is contained in:
parent
43b8f89845
commit
a7a2d8d1bb
@ -25,7 +25,7 @@ class ApiDocExtractorTest extends WebTestCase
|
|||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
|
|
||||||
$this->assertTrue(is_array($data));
|
$this->assertTrue(is_array($data));
|
||||||
$this->assertCount(14, $data);
|
$this->assertCount(15, $data);
|
||||||
|
|
||||||
foreach ($data as $d) {
|
foreach ($data as $d) {
|
||||||
$this->assertTrue(is_array($d));
|
$this->assertTrue(is_array($d));
|
||||||
@ -65,7 +65,7 @@ class ApiDocExtractorTest extends WebTestCase
|
|||||||
$this->assertFalse(isset($array2['filters']));
|
$this->assertFalse(isset($array2['filters']));
|
||||||
$this->assertEquals('Nelmio\ApiDocBundle\Tests\Fixtures\Form\TestType', $a2->getInput());
|
$this->assertEquals('Nelmio\ApiDocBundle\Tests\Fixtures\Form\TestType', $a2->getInput());
|
||||||
|
|
||||||
$a3 = $data['10']['annotation'];
|
$a3 = $data['11']['annotation'];
|
||||||
$this->assertTrue($a3->getHttps());
|
$this->assertTrue($a3->getHttps());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +157,10 @@ _Action without HTTP verb_
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### `ANY` /authenticated ###
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### `POST` /jms-input-test ###
|
### `POST` /jms-input-test ###
|
||||||
|
|
||||||
_Testing JMS_
|
_Testing JMS_
|
||||||
|
@ -53,6 +53,7 @@ class SimpleFormatterTest extends WebTestCase
|
|||||||
'_format' => array('dataType' => '', 'description' => '', 'requirement' => ''),
|
'_format' => array('dataType' => '', 'description' => '', 'requirement' => ''),
|
||||||
),
|
),
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
1 =>
|
1 =>
|
||||||
array(
|
array(
|
||||||
@ -79,6 +80,7 @@ class SimpleFormatterTest extends WebTestCase
|
|||||||
'_format' => array('dataType' => '', 'description' => '', 'requirement' => ''),
|
'_format' => array('dataType' => '', 'description' => '', 'requirement' => ''),
|
||||||
),
|
),
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
2 =>
|
2 =>
|
||||||
array(
|
array(
|
||||||
@ -113,6 +115,7 @@ class SimpleFormatterTest extends WebTestCase
|
|||||||
'_format' => array('dataType' => '', 'description' => '', 'requirement' => ''),
|
'_format' => array('dataType' => '', 'description' => '', 'requirement' => ''),
|
||||||
),
|
),
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
3 =>
|
3 =>
|
||||||
array(
|
array(
|
||||||
@ -147,6 +150,7 @@ class SimpleFormatterTest extends WebTestCase
|
|||||||
'_format' => array('dataType' => '', 'description' => '', 'requirement' => ''),
|
'_format' => array('dataType' => '', 'description' => '', 'requirement' => ''),
|
||||||
),
|
),
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'others' =>
|
'others' =>
|
||||||
@ -167,6 +171,7 @@ class SimpleFormatterTest extends WebTestCase
|
|||||||
),
|
),
|
||||||
'description' => 'create another test',
|
'description' => 'create another test',
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
1 =>
|
1 =>
|
||||||
array(
|
array(
|
||||||
@ -174,6 +179,7 @@ class SimpleFormatterTest extends WebTestCase
|
|||||||
'uri' => '/any',
|
'uri' => '/any',
|
||||||
'description' => 'Action without HTTP verb',
|
'description' => 'Action without HTTP verb',
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
2 =>
|
2 =>
|
||||||
array(
|
array(
|
||||||
@ -185,8 +191,16 @@ class SimpleFormatterTest extends WebTestCase
|
|||||||
),
|
),
|
||||||
'description' => 'Action without HTTP verb',
|
'description' => 'Action without HTTP verb',
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
3 =>
|
3 =>
|
||||||
|
array (
|
||||||
|
'method' => 'ANY',
|
||||||
|
'uri' => '/authenticated',
|
||||||
|
'https' => false,
|
||||||
|
'authentication' => true,
|
||||||
|
),
|
||||||
|
4 =>
|
||||||
array(
|
array(
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'uri' => '/jms-input-test',
|
'uri' => '/jms-input-test',
|
||||||
@ -279,8 +293,9 @@ With multiple lines.',
|
|||||||
),
|
),
|
||||||
'description' => 'Testing JMS',
|
'description' => 'Testing JMS',
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
4 =>
|
5 =>
|
||||||
array(
|
array(
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
'uri' => '/jms-return-test',
|
'uri' => '/jms-return-test',
|
||||||
@ -294,8 +309,9 @@ With multiple lines.',
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
5 =>
|
6 =>
|
||||||
array(
|
array(
|
||||||
'method' => 'ANY',
|
'method' => 'ANY',
|
||||||
'uri' => '/my-commented/{id}/{page}',
|
'uri' => '/my-commented/{id}/{page}',
|
||||||
@ -306,9 +322,10 @@ With multiple lines.',
|
|||||||
),
|
),
|
||||||
'https' => false,
|
'https' => false,
|
||||||
'description' => 'This method is useful to test if the getDocComment works.',
|
'description' => 'This method is useful to test if the getDocComment works.',
|
||||||
'documentation' => "This method is useful to test if the getDocComment works.\nAnd, it supports multilines until the first '@' char."
|
'documentation' => "This method is useful to test if the getDocComment works.\nAnd, it supports multilines until the first '@' char.",
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
6 =>
|
7 =>
|
||||||
array(
|
array(
|
||||||
'method' => 'ANY',
|
'method' => 'ANY',
|
||||||
'uri' => '/secure-route',
|
'uri' => '/secure-route',
|
||||||
@ -322,8 +339,9 @@ With multiple lines.',
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
'https' => true,
|
'https' => true,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
7 =>
|
8 =>
|
||||||
array(
|
array(
|
||||||
'method' => 'ANY',
|
'method' => 'ANY',
|
||||||
'uri' => '/yet-another/{id}',
|
'uri' => '/yet-another/{id}',
|
||||||
@ -332,8 +350,9 @@ With multiple lines.',
|
|||||||
'id' => array('dataType' => '', 'description' => '', 'requirement' => '\d+')
|
'id' => array('dataType' => '', 'description' => '', 'requirement' => '\d+')
|
||||||
),
|
),
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
8 =>
|
9 =>
|
||||||
array(
|
array(
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
'uri' => '/z-action-with-query-param',
|
'uri' => '/z-action-with-query-param',
|
||||||
@ -342,8 +361,9 @@ With multiple lines.',
|
|||||||
'page' => array('description' => 'Page of the overview.', 'requirement' => '\d+')
|
'page' => array('description' => 'Page of the overview.', 'requirement' => '\d+')
|
||||||
),
|
),
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
9 =>
|
10 =>
|
||||||
array(
|
array(
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'uri' => '/z-action-with-request-param',
|
'uri' => '/z-action-with-request-param',
|
||||||
@ -352,6 +372,7 @@ With multiple lines.',
|
|||||||
'param1' => array('description' => 'Param1 description.', 'required' => true, 'dataType' => 'string', 'readonly' => false)
|
'param1' => array('description' => 'Param1 description.', 'required' => true, 'dataType' => 'string', 'readonly' => false)
|
||||||
),
|
),
|
||||||
'https' => false,
|
'https' => false,
|
||||||
|
'authentication' => false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user