Code Duplication    Length = 39-39 lines in 4 locations

tests/OpenOrchestra/Tests/Functional/BackofficeBundle/Command/OrchestraPublishContentCommandTest.php 1 location

@@ 13-51 (lines=39) @@
10
/**
11
 * Class OrchestraPublishContentCommandTest
12
 */
13
class OrchestraPublishContentCommandTest extends AbstractWebTestCase
14
{
15
    use PublishElementCommandTrait;
16
17
    protected $application;
18
19
    /**
20
     * Set Up
21
     */
22
    public function setUp()
23
    {
24
        $client = self::createClient();
25
        $this->application = new Application($client->getKernel());
26
        $this->application->setAutoExit(false);
27
        $this->application->add(new OrchestraPublishContentCommand());
28
    }
29
30
    /**
31
     * Test the command
32
     *
33
     * @param string $siteId
34
     *
35
     * @dataProvider provideSiteId
36
     */
37
    public function testExecute($siteId)
38
    {
39
        $this->executePublish($siteId, 'orchestra:publish:content', 'open_orchestra_model.repository.content', 'content');
40
    }
41
42
    /**
43
     * Provide site id
44
     */
45
    public function provideSiteId()
46
    {
47
        return array(
48
            array('2'),
49
        );
50
    }
51
}
52

tests/OpenOrchestra/Tests/Functional/BackofficeBundle/Command/OrchestraPublishNodeCommandTest.php 1 location

@@ 13-51 (lines=39) @@
10
/**
11
 * Class OrchestraPublishNodeCommandTest
12
 */
13
class OrchestraPublishNodeCommandTest extends AbstractWebTestCase
14
{
15
    use PublishElementCommandTrait;
16
17
    protected $application;
18
19
    /**
20
     * Set Up
21
     */
22
    public function setUp()
23
    {
24
        $client = self::createClient();
25
        $this->application = new Application($client->getKernel());
26
        $this->application->setAutoExit(false);
27
        $this->application->add(new OrchestraPublishNodeCommand());
28
    }
29
30
    /**
31
     * Test the command
32
     *
33
     * @param string $siteId
34
     *
35
     * @dataProvider provideSiteId
36
     */
37
    public function testExecute($siteId)
38
    {
39
        $this->executePublish($siteId, 'orchestra:publish:node', 'open_orchestra_model.repository.node', 'node');
40
    }
41
42
    /**
43
     * Provide site id
44
     */
45
    public function provideSiteId()
46
    {
47
        return array(
48
            array('2'),
49
        );
50
    }
51
}
52

tests/OpenOrchestra/Tests/Functional/BackofficeBundle/Command/OrchestraUnpublishContentCommandTest.php 1 location

@@ 13-51 (lines=39) @@
10
/**
11
 * Class OrchestraUnpublishContentCommandTest
12
 */
13
class OrchestraUnpublishContentCommandTest extends AbstractWebTestCase
14
{
15
    use PublishElementCommandTrait;
16
17
    protected $application;
18
19
    /**
20
     * Set Up
21
     */
22
    public function setUp()
23
    {
24
        $client = self::createClient();
25
        $this->application = new Application($client->getKernel());
26
        $this->application->setAutoExit(false);
27
        $this->application->add(new OrchestraUnpublishContentCommand());
28
    }
29
30
    /**
31
     * Test the command
32
     *
33
     * @param string $siteId
34
     *
35
     * @dataProvider provideSiteId
36
     */
37
    public function testExecute($siteId)
38
    {
39
        $this->executeUnpublish($siteId, 'orchestra:unpublish:content', 'open_orchestra_model.repository.content', 'content');
40
    }
41
42
    /**
43
     * Provide site id
44
     */
45
    public function provideSiteId()
46
    {
47
        return array(
48
            array('2'),
49
        );
50
    }
51
}
52

tests/OpenOrchestra/Tests/Functional/BackofficeBundle/Command/OrchestraUnpublishNodeCommandTest.php 1 location

@@ 13-51 (lines=39) @@
10
/**
11
 * Class OrchestraUnpublishNodeCommandTest
12
 */
13
class OrchestraUnpublishNodeCommandTest extends AbstractWebTestCase
14
{
15
    use PublishElementCommandTrait;
16
17
    protected $application;
18
19
    /**
20
     * Set Up
21
     */
22
    public function setUp()
23
    {
24
        $client = self::createClient();
25
        $this->application = new Application($client->getKernel());
26
        $this->application->setAutoExit(false);
27
        $this->application->add(new OrchestraUnpublishNodeCommand());
28
    }
29
30
    /**
31
     * Test the command
32
     *
33
     * @param string $siteId
34
     *
35
     * @dataProvider provideSiteId
36
     */
37
    public function testExecute($siteId)
38
    {
39
        $this->executeUnpublish($siteId, 'orchestra:unpublish:node', 'open_orchestra_model.repository.node', 'node');
40
    }
41
42
    /**
43
     * Provide site id
44
     */
45
    public function provideSiteId()
46
    {
47
        return array(
48
            array('2'),
49
        );
50
    }
51
}
52