Code Duplication    Length = 9-13 lines in 3 locations

tests/Behat/Context/Setup/StaticContentContext.php 3 locations

@@ 46-54 (lines=9) @@
43
    /**
44
     * @Given the store has static content :title
45
     */
46
    public function theStoreHasStaticContent($title)
47
    {
48
        $staticContent = $this->staticContentExampleFactory->create(['title' => $title, 'publishable' => true]);
49
50
        $this->staticContentManager->persist($staticContent);
51
        $this->staticContentManager->flush();
52
53
        $this->sharedStorage->set('static_content', $staticContent);
54
    }
55
56
    /**
57
     * @Given the store has static contents :firstTitle and :secondTitle
@@ 69-81 (lines=13) @@
66
    /**
67
     * @Given the store has static content :title with body :body
68
     */
69
    public function theStoreHasStaticContentWithBody($title, $body)
70
    {
71
        $staticContent = $this->staticContentExampleFactory->create([
72
            'title' => $title,
73
            'body' => $body,
74
            'publishable' => true,
75
        ]);
76
77
        $this->staticContentManager->persist($staticContent);
78
        $this->staticContentManager->flush();
79
80
        $this->sharedStorage->set('static_content', $staticContent);
81
    }
82
83
    /**
84
     * @Given the store has static content :title with name :name
@@ 86-98 (lines=13) @@
83
    /**
84
     * @Given the store has static content :title with name :name
85
     */
86
    public function theStoreHasStaticContentWithName($title, $name)
87
    {
88
        $staticContent = $this->staticContentExampleFactory->create([
89
            'title' => $title,
90
            'name' => $name,
91
            'publishable' => true,
92
        ]);
93
94
        $this->staticContentManager->persist($staticContent);
95
        $this->staticContentManager->flush();
96
97
        $this->sharedStorage->set('static_content', $staticContent);
98
    }
99
100
    /**
101
     * @Given /^(it) is not published yet$/