Code Duplication    Length = 13-15 lines in 2 locations

eZ/Publish/Core/Repository/Tests/Service/Mock/RepositoryTest.php 2 locations

@@ 1139-1151 (lines=13) @@
1136
     *
1137
     * @covers \eZ\Publish\API\Repository\Repository::rollback
1138
     */
1139
    public function testRollback()
1140
    {
1141
        $mockedRepository = $this->getRepository();
1142
        $persistenceHandlerMock = $this->getPersistenceMock();
1143
1144
        $persistenceHandlerMock->expects(
1145
            $this->once()
1146
        )->method(
1147
            'rollback'
1148
        );
1149
1150
        $mockedRepository->rollback();
1151
    }
1152
1153
    /**
1154
     * Test for the rollback() method.
@@ 1159-1173 (lines=15) @@
1156
     * @covers \eZ\Publish\API\Repository\Repository::rollback
1157
     * @expectedException \RuntimeException
1158
     */
1159
    public function testRollbackThrowsRuntimeException()
1160
    {
1161
        $mockedRepository = $this->getRepository();
1162
        $persistenceHandlerMock = $this->getPersistenceMock();
1163
1164
        $persistenceHandlerMock->expects(
1165
            $this->once()
1166
        )->method(
1167
            'rollback'
1168
        )->will(
1169
            $this->throwException(new \Exception())
1170
        );
1171
1172
        $mockedRepository->rollback();
1173
    }
1174
}
1175