Completed
Push — master ( 8d9cf8...669f46 )
by Vítězslav
04:09
created

NastaveniTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace Test\FlexiPeeHP;
4
5
use FlexiPeeHP\Nastaveni;
6
7
/**
8
 * Generated by PHPUnit_SkeletonGenerator on 2016-04-27 at 17:32:11.
9
 */
10
class NastaveniTest extends FlexiBeeTest
11
{
12
    /**
13
     * @var Nastaveni
14
     */
15
    protected $object;
16
17
    /**
18
     * Sets up the fixture, for example, opens a network connection.
19
     * This method is called before a test is executed.
20
     */
21
    protected function setUp()
22
    {
23
        $this->object = new Nastaveni();
24
    }
25
26
    /**
27
     * Tears down the fixture, for example, closes a network connection.
28
     * This method is called after a test is executed.
29
     */
30
    protected function tearDown()
31
    {
32
33
    }
34
35
    /**
36
     * @covers FlexiPeeHP\Nastaveni::getFlexiData
37
     */
38
    public function testGetFlexiData()
39
    {
40
        if ($this->object->url == 'https://demo.flexibee.eu') {
41
            $this->markTestSkipped('Public demo site does not allow read here');
42 View Code Duplication
        } else {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across 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...
43
            $flexidata = $this->object->getFlexiData();
44
            $this->assertArrayHasKey(0, $flexidata);
45
            $this->assertArrayHasKey('id', $flexidata[0]);
46
            $filtrered = $this->object->getFlexiData(null,
47
                key($flexidata[0])." = ".current($flexidata[0]));
48
            $this->assertArrayHasKey(0, $filtrered);
49
            $this->assertArrayHasKey('id', $filtrered[0]);
50
        }
51
    }
52
}