Code Duplication    Length = 11-11 lines in 2 locations

eZ/Publish/Core/REST/Server/Tests/Input/Parser/LocationUpdateTest.php 2 locations

@@ 81-91 (lines=11) @@
78
     * @expectedException \eZ\Publish\Core\REST\Common\Exceptions\Parser
79
     * @expectedExceptionMessage Missing 'sortField' element for LocationUpdate.
80
     */
81
    public function testParseExceptionOnMissingSortField()
82
    {
83
        $inputArray = array(
84
            'priority' => 0,
85
            'remoteId' => 'remote-id',
86
            'sortOrder' => 'ASC',
87
        );
88
89
        $locationUpdate = $this->getParser();
90
        $locationUpdate->parse($inputArray, $this->getParsingDispatcherMock());
91
    }
92
93
    /**
94
     * Test LocationUpdate parser throwing exception on missing sort order.
@@ 99-109 (lines=11) @@
96
     * @expectedException \eZ\Publish\Core\REST\Common\Exceptions\Parser
97
     * @expectedExceptionMessage Missing 'sortOrder' element for LocationUpdate.
98
     */
99
    public function testParseExceptionOnMissingSortOrder()
100
    {
101
        $inputArray = array(
102
            'priority' => 0,
103
            'remoteId' => 'remote-id',
104
            'sortField' => 'PATH',
105
        );
106
107
        $locationUpdate = $this->getParser();
108
        $locationUpdate->parse($inputArray, $this->getParsingDispatcherMock());
109
    }
110
111
    /**
112
     * Returns the LocationUpdateStruct parser.