Completed
Push — master ( b91afe...a94b1d )
by itkg-nanne
09:31
created

OrchestraUnpublishNodeCommandTest::testExecute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace OpenOrchestra\FunctionalTests\BackofficeBundle\Command;
4
5
use OpenOrchestra\BackofficeBundle\Command\OrchestraUnpublishNodeCommand;
6
use Symfony\Bundle\FrameworkBundle\Console\Application;
7
use OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractWebTestCase;
8
use OpenOrchestra\FunctionalTests\BackofficeBundle\Command\PublishElementCommandTrait;
9
10
/**
11
 * Class OrchestraUnpublishNodeCommandTest
12
 */
13 View Code Duplication
class OrchestraUnpublishNodeCommandTest extends AbstractWebTestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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