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

OrchestraPublishNodeCommandTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace OpenOrchestra\FunctionalTests\BackofficeBundle\Command;
4
5
use Symfony\Bundle\FrameworkBundle\Console\Application;
6
use OpenOrchestra\BackofficeBundle\Command\OrchestraPublishNodeCommand;
7
use OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractWebTestCase;
8
use OpenOrchestra\FunctionalTests\BackofficeBundle\Command\PublishElementCommandTrait;
9
10
/**
11
 * Class OrchestraPublishNodeCommandTest
12
 */
13 View Code Duplication
class OrchestraPublishNodeCommandTest 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 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