Code Duplication    Length = 13-15 lines in 2 locations

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

@@ 85-97 (lines=13) @@
82
     *
83
     * @covers \eZ\Publish\API\Repository\Repository::rollback
84
     */
85
    public function testRollback()
86
    {
87
        $mockedRepository = $this->getRepository();
88
        $persistenceHandlerMock = $this->getPersistenceMock();
89
90
        $persistenceHandlerMock->expects(
91
            $this->once()
92
        )->method(
93
            'rollback'
94
        );
95
96
        $mockedRepository->rollback();
97
    }
98
99
    /**
100
     * Test for the rollback() method.
@@ 105-119 (lines=15) @@
102
     * @covers \eZ\Publish\API\Repository\Repository::rollback
103
     * @expectedException \RuntimeException
104
     */
105
    public function testRollbackThrowsRuntimeException()
106
    {
107
        $mockedRepository = $this->getRepository();
108
        $persistenceHandlerMock = $this->getPersistenceMock();
109
110
        $persistenceHandlerMock->expects(
111
            $this->once()
112
        )->method(
113
            'rollback'
114
        )->will(
115
            $this->throwException(new \Exception())
116
        );
117
118
        $mockedRepository->rollback();
119
    }
120
}
121