StitekTest::testListToArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace Test\FlexiPeeHP;
4
5
use FlexiPeeHP\Stitek;
6
7
/**
8
 * Generated by PHPUnit_SkeletonGenerator on 2016-04-27 at 17:32:11.
9
 */
10
class StitekTest extends FlexiBeeRWTest
11
{
12
    /**
13
     * @var Stitek
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(): void
22
    {
23
        $this->object = new Stitek;
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(): void
31
    {
32
        
33
    }
34
35
    /**
36
     * @covers FlexiPeeHP\Stitek::getLabels
37
     */
38
    public function testGetLabels()
39
    {
40
        $this->object->getLabels(new \FlexiPeeHP\Adresar());
0 ignored issues
show
Deprecated Code introduced by
The function FlexiPeeHP\Stitek::getLabels() has been deprecated: since version 1.21 ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

40
        /** @scrutinizer ignore-deprecated */ $this->object->getLabels(new \FlexiPeeHP\Adresar());

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
41
    }
42
43
    /**
44
     * @covers FlexiPeeHP\Stitek::listToArray
45
     */
46
    public function testListToArray()
47
    {
48
        $this->assertEquals(['A' => 'A', 'B' => 'B'], Stitek::listToArray('A,B'));
0 ignored issues
show
Bug introduced by
The method assertEquals() does not exist on Test\FlexiPeeHP\StitekTest. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

48
        $this->/** @scrutinizer ignore-call */ 
49
               assertEquals(['A' => 'A', 'B' => 'B'], Stitek::listToArray('A,B'));

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
49
    }
50
51
    /**
52
     * @covers FlexiPeeHP\Stitek::getAvailbleLabels
53
     */
54
    public function testGetAvailbleLabels()
55
    {
56
        $labels = \FlexiPeeHP\Stitek::getAvailbleLabels(new \FlexiPeeHP\FakturaVydana());
57
        $this->assertTrue(is_array($labels) && count($labels));
0 ignored issues
show
Bug introduced by
The method assertTrue() does not exist on Test\FlexiPeeHP\StitekTest. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

57
        $this->/** @scrutinizer ignore-call */ 
58
               assertTrue(is_array($labels) && count($labels));

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
58
    }
59
60
    /**
61
     * @covers FlexiPeeHP\Stitek::setLabel
62
     * @todo   Implement testSetLabel().
63
     */
64
    public function testSetLabel()
65
    {
66
        // Remove the following lines when you implement this test.
67
        $this->markTestIncomplete(
0 ignored issues
show
Bug introduced by
The method markTestIncomplete() does not exist on Test\FlexiPeeHP\StitekTest. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

67
        $this->/** @scrutinizer ignore-call */ 
68
               markTestIncomplete(

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
68
            'This test has not been implemented yet.'
69
        );
70
    }
71
72
    /**
73
     * @covers FlexiPeeHP\Stitek::unsetLabel
74
     * @todo   Implement testUnsetLabel().
75
     */
76
    public function testUnsetLabel()
77
    {
78
        // Remove the following lines when you implement this test.
79
        $this->markTestIncomplete(
80
            'This test has not been implemented yet.'
81
        );
82
    }
83
84
    /**
85
     * @covers FlexiPeeHP\Stitek::createNew
86
     */
87
    public function testCreateNew()
88
    {
89
        $this->assertFalse($this->object->createNew('Without Invoice',
0 ignored issues
show
Bug introduced by
The method assertFalse() does not exist on Test\FlexiPeeHP\StitekTest. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

89
        $this->/** @scrutinizer ignore-call */ 
90
               assertFalse($this->object->createNew('Without Invoice',

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
90
                ['pokladna']));
91
92
        $testCode = \Ease\Sand::randomString();
93
94
        $this->assertTrue($this->object->createNew('Example Label',
95
                ['faktura-vydana', 'faktura-prijata'], ['kod' => $testCode]));
96
97
        $this->object->deleteFromFlexiBee($this->object->getRecordIdent()); //Cleanup
98
    }
99
}
100