Code Duplication    Length = 14-14 lines in 2 locations

www/src/DembeloMain/Tests/Controller/DefaultControllerTest.php 2 locations

@@ 163-176 (lines=14) @@
160
     * tests readTOpicAction for invalid topic id
161
     * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
162
     */
163
    public function testReadTopicActionForInvalidTopicId(): void
164
    {
165
        $topicId = 'someTopicId';
166
167
        $this->featureToggleMock->expects(self::once())
168
            ->method('hasFeature')
169
            ->willReturn(false);
170
        $this->textnodeRepositoryMock->expects(self::once())
171
            ->method('getTextnodeToRead')
172
            ->with($topicId)
173
            ->willReturn(null);
174
175
        $this->controller->readTopicAction($topicId);
176
    }
177
178
    /**
179
     * test readtopicAction for valid topic and guest user
@@ 406-419 (lines=14) @@
403
     * tests readTextnodeAction for invalid Id
404
     * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
405
     */
406
    public function testReadTextnodeActionForInvalidId(): void
407
    {
408
        $textnodeArbitraryId = 'someId';
409
410
        $this->featureToggleMock->expects(self::once())
411
            ->method('hasFeature')
412
            ->willReturn(false);
413
        $this->textnodeRepositoryMock->expects(self::once())
414
            ->method('findOneActiveByArbitraryId')
415
            ->with($textnodeArbitraryId)
416
            ->willReturn(null);
417
418
        $this->controller->readTextnodeAction($textnodeArbitraryId);
419
    }
420
421
    /**
422
     * test readTextnodeAction for valid textnode