Completed
Push — master ( 99f0e4...d008dc )
by Rafał
02:29
created

BridgeTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 32
rs 10
1
<?php
2
3
/**
4
 * This file is part of the Superdesk Web Publisher Bridge Bundle.
5
 *
6
 * Copyright 2016 Sourcefabric z.u. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2016 Sourcefabric z.ú.
12
 * @license http://www.superdesk.org/license
13
 */
14
namespace SWP\Bundle\BridgeBundle\Tests\Functional;
15
16
class BridgeTest extends WebTestCase
17
{
18
    const TEST_CASE_NAME = 'Bridge';
19
20
    /**
21
     * @expectedException \Superdesk\ContentApiSdk\Exception\ContentApiException
22
     * @dataProvider getConfigs
23
     */
24
    public function testIndexForCallToInvalidEndpoints($config)
25
    {
26
        $client = $this->createClient(array('test_case' => self::TEST_CASE_NAME, 'root_config' => $config));
27
28
        $client->request('GET', '/bridge/invalid_endpoint/');
29
    }
30
31
    public function getConfigs()
32
    {
33
        return array(
34
            array('config.yml'),
35
        );
36
    }
37
38
    public static function setUpBeforeClass()
39
    {
40
        parent::deleteTmpDir(self::TEST_CASE_NAME);
41
    }
42
43
    public static function tearDownAfterClass()
44
    {
45
        parent::deleteTmpDir(self::TEST_CASE_NAME);
46
    }
47
}
48