Code Duplication    Length = 24-24 lines in 2 locations

eZ/Publish/Core/MVC/Symfony/Security/Tests/Authentication/RememberMeRepositoryAuthenticationProviderTest.php 1 location

@@ 141-164 (lines=24) @@
138
    /**
139
     * @return \eZ\Publish\Core\Repository\Permission\PermissionResolver|\PHPUnit_Framework_MockObject_MockObject
140
     */
141
    private function getPermissionResolverMock()
142
    {
143
        return $this
144
            ->getMockBuilder(PermissionResolver::class)
145
            ->setMethods(null)
146
            ->setConstructorArgs(
147
                [
148
                    $this
149
                        ->getMockBuilder(RoleDomainMapper::class)
150
                        ->disableOriginalConstructor()
151
                        ->getMock(),
152
                    $this
153
                        ->getMockBuilder(LimitationService::class)
154
                        ->getMock(),
155
                    $this
156
                        ->getMockBuilder(UserHandler::class)
157
                        ->getMock(),
158
                    $this
159
                        ->getMockBuilder(UserReference::class)
160
                        ->getMock(),
161
                ]
162
            )
163
            ->getMock();
164
    }
165
}
166

eZ/Publish/Core/MVC/Symfony/Cache/Tests/Http/InstantCachePurgerTest.php 1 location

@@ 140-163 (lines=24) @@
137
    /**
138
     * @return \eZ\Publish\Core\Repository\Permission\PermissionResolver|\PHPUnit_Framework_MockObject_MockObject
139
     */
140
    private function getPermissionResolverMock()
141
    {
142
        return $this
143
            ->getMockBuilder(PermissionResolver::class)
144
            ->setMethods(null)
145
            ->setConstructorArgs(
146
                [
147
                    $this
148
                        ->getMockBuilder(RoleDomainMapper::class)
149
                        ->disableOriginalConstructor()
150
                        ->getMock(),
151
                    $this
152
                        ->getMockBuilder(LimitationService::class)
153
                        ->getMock(),
154
                    $this
155
                        ->getMockBuilder(UserHandler::class)
156
                        ->getMock(),
157
                    $this
158
                        ->getMockBuilder(UserReference::class)
159
                        ->getMock(),
160
                ]
161
            )
162
            ->getMock();
163
    }
164
}
165