Code Duplication    Length = 23-23 lines in 4 locations

src/Oro/Bundle/EmailBundle/Tests/Selenium/Pages/Email.php 1 location

@@ 50-72 (lines=23) @@
47
     * @param $content string
48
     * @return $this
49
     */
50
    public function setBody($content)
51
    {
52
        $this->test->waitUntil(
53
            function (\PHPUnit_Extensions_Selenium2TestCase $testCase) {
54
                return $testCase->execute(
55
                    [
56
                        'script' => 'return tinyMCE.activeEditor.initialized',
57
                        'args' => [],
58
                    ]
59
                );
60
            },
61
            intval(MAX_EXECUTION_TIME)
62
        );
63
64
        $this->test->execute(
65
            [
66
                'script' => sprintf('tinyMCE.activeEditor.setContent(\'%s\')', $content),
67
                'args' => [],
68
            ]
69
        );
70
71
        return $this;
72
    }
73
74
    /**
75
     * @param $value

src/Oro/Bundle/EmailBundle/Tests/Selenium/Pages/EmailTemplate.php 1 location

@@ 108-130 (lines=23) @@
105
     * @param $content string
106
     * @return $this
107
     */
108
    public function setContent($content)
109
    {
110
        $this->test->waitUntil(
111
            function (\PHPUnit_Extensions_Selenium2TestCase $testCase) {
112
                return $testCase->execute(
113
                    [
114
                        'script' => 'return tinyMCE.activeEditor.initialized',
115
                        'args' => [],
116
                    ]
117
                );
118
            },
119
            intval(MAX_EXECUTION_TIME)
120
        );
121
122
        $this->test->execute(
123
            [
124
                'script' => sprintf('tinyMCE.activeEditor.setContent(\'%s\')', $content),
125
                'args' => [],
126
            ]
127
        );
128
129
        return $this;
130
    }
131
132
    public function getContent()
133
    {

src/Oro/Bundle/NoteBundle/Tests/Selenium/Pages/Notes.php 1 location

@@ 45-67 (lines=23) @@
42
     * @param string $note
43
     * @return $this
44
     */
45
    public function setNoteMessage($note)
46
    {
47
        $this->test->waitUntil(
48
            function (\PHPUnit_Extensions_Selenium2TestCase $testCase) {
49
                return $testCase->execute(
50
                    [
51
                        'script' => 'return tinyMCE.activeEditor.initialized',
52
                        'args' => [],
53
                    ]
54
                );
55
            },
56
            intval(MAX_EXECUTION_TIME)
57
        );
58
59
        $this->test->execute(
60
            [
61
                'script' => sprintf('tinyMCE.activeEditor.setContent(\'%s\')', $note),
62
                'args' => [],
63
            ]
64
        );
65
66
        return $this;
67
    }
68
69
    /**
70
     * @return $this

src/Oro/Bundle/UserBundle/Tests/Selenium/Pages/User.php 1 location

@@ 414-436 (lines=23) @@
411
     * @param $value
412
     * @return $this
413
     */
414
    public function setSignature($value)
415
    {
416
        $this->test->waitUntil(
417
            function (\PHPUnit_Extensions_Selenium2TestCase $testCase) {
418
                return $testCase->execute(
419
                    [
420
                        'script' => 'return tinyMCE.activeEditor.initialized',
421
                        'args' => [],
422
                    ]
423
                );
424
            },
425
            intval(MAX_EXECUTION_TIME)
426
        );
427
428
        $this->test->execute(
429
            [
430
                'script' => sprintf('tinyMCE.activeEditor.setContent(\'%s\')', $value),
431
                'args' => [],
432
            ]
433
        );
434
435
        return $this;
436
    }
437
438
    /**
439
     * Method changes password using actions menu form user view page