Code Duplication    Length = 14-14 lines in 2 locations

src/Tests/Functional/VndParameterValidationErrorTest.php 2 locations

@@ 56-69 (lines=14) @@
53
    /**
54
     * @test
55
     */
56
    public function parameterValidationErrorWillContainSpecificationPointer()
57
    {
58
        try {
59
            $this->get('/v2/pet/findByStatus', ['status' => 'bogus']);
60
        } catch (ApiResponseErrorException $e) {
61
            $error = Hal::fromJson($e->getJson(), 10);
62
            $resource = $error->getFirstResource('errors');
63
            $specLink = 'http://petstore.swagger.io/swagger/petstore.yml#/paths/~1pet~1findByStatus/get/parameters/0';
64
            $this->assertSame($specLink, $resource->getUri());
65
66
            return;
67
        }
68
        $this->fail("Expected exception");
69
    }
70
71
    /**
72
     * @test
@@ 74-87 (lines=14) @@
71
    /**
72
     * @test
73
     */
74
    public function parameterValidationErrorWillContainSchemaPointer()
75
    {
76
        try {
77
            $this->get('/v2/pet/findByStatus', ['status' => 'bogus']);
78
        } catch (ApiResponseErrorException $e) {
79
            $error = Hal::fromJson($e->getJson(), 10);
80
            $resource = $error->getFirstResource('errors');
81
            $data = $resource->getData();
82
            $this->assertSame('/paths/~1pet~1findByStatus/get/x-request-schema/properties/status', $data['path']);
83
84
            return;
85
        }
86
        $this->fail("Expected exception");
87
    }
88
89
    /**
90
     * @test