Code Duplication    Length = 19-23 lines in 3 locations

eZ/Publish/Core/REST/Client/Tests/Output/ValueObjectVisitor/RestContentMetadataUpdateStruct.php 1 location

@@ 23-45 (lines=23) @@
20
     *
21
     * @return string
22
     */
23
    public function testVisitComplete()
24
    {
25
        $visitor = $this->getVisitor();
26
        $generator = $this->getGenerator();
27
28
        $generator->startDocument(null);
29
30
        $sectionCreatestruct = new RestContentMetadataUpdateStruct(
31
            $this->getValidValues()
32
        );
33
34
        $visitor->visit(
35
            $this->getVisitorMock(),
36
            $generator,
37
            $sectionCreatestruct
38
        );
39
40
        $result = $generator->endDocument(null);
41
42
        $this->assertNotNull($result);
43
44
        return $result;
45
    }
46
47
    /**
48
     * Tests that result contains ContentUpdate element.

eZ/Publish/Core/REST/Server/Tests/Output/ValueObjectVisitor/BookmarkListTest.php 1 location

@@ 35-53 (lines=19) @@
32
        ]);
33
    }
34
35
    public function testVisit(): string
36
    {
37
        $visitor = $this->getVisitor();
38
        $generator = $this->getGenerator();
39
40
        $generator->startDocument(null);
41
42
        $visitor->visit(
43
            $this->getVisitorMock(),
44
            $generator,
45
            $this->data
46
        );
47
48
        $result = $generator->endDocument(null);
49
50
        $this->assertNotNull($result);
51
52
        return $result;
53
    }
54
55
    /**
56
     * @depends testVisit

eZ/Publish/Core/REST/Server/Tests/Output/ValueObjectVisitor/ContentFieldValidationExceptionTest.php 1 location

@@ 25-45 (lines=21) @@
22
     *
23
     * @return string
24
     */
25
    public function testVisit()
26
    {
27
        $visitor = $this->getVisitor();
28
        $generator = $this->getGenerator();
29
30
        $generator->startDocument(null);
31
32
        $exception = $this->getException();
33
34
        $visitor->visit(
35
            $this->getVisitorMock(),
36
            $generator,
37
            $exception
38
        );
39
40
        $result = $generator->endDocument(null);
41
42
        $this->assertNotNull($result);
43
44
        return $result;
45
    }
46
47
    /**
48
     * Test if result contains ErrorMessage element and description.