Code Duplication    Length = 11-11 lines in 2 locations

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

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