OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
zircote
/
swagger-php
/
tests
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:03 AM
rwxr-xr-x
📁
Analysers
-
08/07/2024 04:34:31 AM
rwxr-xr-x
📄
AnalysisTest.php
4.09 KB
08/07/2024 04:34:02 AM
rw-r--r--
📁
Annotations
-
08/07/2024 04:34:31 AM
rwxr-xr-x
📄
CommandlineTest.php
2.47 KB
08/07/2024 04:34:02 AM
rw-r--r--
📄
ConstantsTest.php
2.24 KB
08/07/2024 04:34:02 AM
rw-r--r--
📄
ContextTest.php
2.79 KB
08/07/2024 04:34:02 AM
rw-r--r--
📄
ExamplesTest.php
8.22 KB
08/07/2024 04:34:02 AM
rw-r--r--
📁
Fixtures
-
08/07/2024 04:34:54 AM
rwxr-xr-x
📄
GeneratorTest.php
4.71 KB
08/07/2024 04:34:02 AM
rw-r--r--
📄
OpenApiTestCase.php
9.78 KB
08/07/2024 04:34:02 AM
rw-r--r--
📄
PipelineTest.php
2.52 KB
08/07/2024 04:34:03 AM
rw-r--r--
📁
Processors
-
08/07/2024 04:34:33 AM
rwxr-xr-x
📄
RefTest.php
1.08 KB
08/07/2024 04:34:03 AM
rw-r--r--
📁
Samples
-
08/07/2024 04:34:33 AM
rwxr-xr-x
📄
ScratchTest.php
1.94 KB
08/07/2024 04:34:03 AM
rw-r--r--
📄
SerializerTest.php
6.39 KB
08/07/2024 04:34:03 AM
rw-r--r--
📄
UtilTest.php
2.84 KB
08/07/2024 04:34:03 AM
rw-r--r--
📄
cl_bootstrap.php
342 bytes
08/07/2024 04:34:02 AM
rw-r--r--
Editing: RefTest.php
Close
<?php declare(strict_types=1); /** * @license Apache 2.0 */ namespace OpenApi\Tests; use OpenApi\Analysis; use OpenApi\Annotations as OA; use OpenApi\Generator; class RefTest extends OpenApiTestCase { public function testRef(): void { $openapi = $this->createOpenApiWithInfo(); $info = $openapi->ref('#/info'); $this->assertInstanceOf(OA\Info::class, $info); $comment = <<<END @OA\Get( path="/api/~/endpoint", @OA\Response(response="default", description="A response") ) END; $openapi->merge($this->annotationsFromDocBlockParser($comment)); $analysis = new Analysis([], $this->getContext()); $analysis->addAnnotation($openapi, $this->getContext()); (new Generator())->getProcessorPipeline()->process($analysis); $analysis->validate(); // escape / as ~1 // escape ~ as ~0 $response = $openapi->ref('#/paths/~1api~1~0~1endpoint/get/responses/default'); $this->assertInstanceOf(OA\Response::class, $response); $this->assertSame('A response', $response->description); } }