Code Duplication    Length = 11-11 lines in 2 locations

src/Tests/Dev/DocumentFixer/SwaggerBundleResponseFixerTest.php 2 locations

@@ 57-67 (lines=11) @@
54
    /**
55
     * @test
56
     */
57
    public function willAddServerErrorResponseToOperations()
58
    {
59
        $fixer = new SwaggerBundleResponseFixer();
60
        $document = new SwaggerDocument(__DIR__ . '/assets/minimal.yml');
61
        $fixer->fix($document);
62
63
        $operationDefinition = $document->getOperationDefinition('/', 'get');
64
        $responses = $operationDefinition['responses'];
65
        $this->assertArrayHasKey('500', $responses);
66
        $this->assertSame($responses['500']['schema']['$ref'], '#/responses/ServerError');
67
    }
68
69
    /**
70
     * @test
@@ 90-100 (lines=11) @@
87
    /**
88
     * @test
89
     */
90
    public function willAddInputErrorResponseToOperations()
91
    {
92
        $fixer = new SwaggerBundleResponseFixer();
93
        $document = new SwaggerDocument(__DIR__ . '/assets/minimal.yml');
94
        $fixer->fix($document);
95
96
        $operationDefinition = $document->getOperationDefinition('/', 'get');
97
        $responses = $operationDefinition['responses'];
98
        $this->assertArrayHasKey('400', $responses);
99
        $this->assertSame($responses['400']['schema']['$ref'], '#/responses/InputError');
100
    }
101
}
102