Code Duplication    Length = 13-14 lines in 2 locations

src/test/AbstractResourceCest.php 2 locations

@@ 78-91 (lines=14) @@
75
     * - headers: (optional) string[] pairs of header => value expected in the
76
     *   response.
77
     */
78
    protected function internalIndex(Tester $I, Example $example)
79
    {
80
        // Authenticates configured user.
81
        $this->authUser($I, $example);
82
83
        // Send request
84
        $I->sendGET($this->parseUrl($example));
85
86
        // Checks the response has the required headers and body.
87
        $this->checkResponse([
88
            HttpCode::OK => 'checkSuccessIndexResponse',
89
            HttpCode::UNPROCESSABLE_ENTITY => 'checkValidationResponse',
90
        ], $I, $example);
91
    }
92
93
    /**
94
     * Handles the internal logic when running a test on a creating a record.
@@ 141-153 (lines=13) @@
138
     * - headers: (optional) string[] pairs of header => value expected in the
139
     *   response.
140
     */
141
    protected function internalView(Tester $I, Example $example)
142
    {
143
        // Authenticates configured user.
144
        $this->authUser($I, $example);
145
146
        // Send request
147
        $I->sendGET($this->parseUrl($example));
148
149
        // Checks the response has the required headers and body.
150
        $this->checkResponse([
151
            HttpCode::OK => 'checkSuccessViewResponse',
152
        ], $I, $example);
153
    }
154
155
    /**
156
     * Handles the internal logic when running a test on a updating a record.